Auth Templates

Create a auth template(admin)

POST auth template(admin)

Endpoint

POST /api/v1/auth_templates

Request

Route

POST /api/v1/auth_templates

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMyIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTczNzU1MTU0OCwiZXhwIjoxNzQwMTQzNTQ4LCJqdGkiOiJjMzVjMzY5Yy0yNGFiLTQ5ZDMtODVlZS0xNWM3YWYyNTBkZGEifQ.cIzViDzmcvylRbWl-S_zkrGCh7YYKuilDNY_uVZPdXU
Host: example.org
Cookie: 

Body

{
  "auth_template": {
    "name": "explicabo",
    "content": "Dolor repudiandae eaque. Ratione non hic. Et consequatur quia.",
    "operator_full_name": "Sirena Anderson",
    "operator_position": "Lead Administration Agent",
    "usage": [
      [
        "create_account",
        "company_details"
      ]
    ],
    "image": "eyJfcmFpbHMiOnsiZGF0YSI6NiwicHVyIjoiYmxvYl9pZCJ9fQ==--332cec50a102f254912a5acdfc48715235512b78",
    "operator_image": "eyJfcmFpbHMiOnsiZGF0YSI6NywicHVyIjoiYmxvYl9pZCJ9fQ==--5bdb04ad582dec5cf5ad1afd24fb73c24cbe2982"
  }
}

Response

Simulated Response

Status

200

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"23ec7d9d3a4363c26d36382719447cfb"
cache-control: max-age=0, private, must-revalidate
x-request-id: c43108b3-ea52-4cee-8e25-97f61fadcb37
x-runtime: 0.139111
content-length: 849

Body

{
  "auth_template": {
    "id": 4,
    "content": "Dolor repudiandae eaque. Ratione non hic. Et consequatur quia.",
    "image": {
      "id": 6,
      "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6NiwicHVyIjoiYmxvYl9pZCJ9fQ==--332cec50a102f254912a5acdfc48715235512b78",
      "byte_size": 596,
      "filename": "test",
      "url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6NiwicHVyIjoiYmxvYl9pZCJ9fQ==--332cec50a102f254912a5acdfc48715235512b78/test"
    },
    "operator_full_name": "Sirena Anderson",
    "operator_image": {
      "id": 7,
      "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6NywicHVyIjoiYmxvYl9pZCJ9fQ==--5bdb04ad582dec5cf5ad1afd24fb73c24cbe2982",
      "byte_size": 596,
      "filename": "test",
      "url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6NywicHVyIjoiYmxvYl9pZCJ9fQ==--5bdb04ad582dec5cf5ad1afd24fb73c24cbe2982/test"
    },
    "operator_position": "Lead Administration Agent"
  }
}