Skip to main content
POST
/
api
/
v1
/
contexts
Create Context
curl --request POST \
  --url https://api.example.com/api/v1/contexts \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "last_active_at": "2023-11-07T05:31:56Z",
  "provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request schema for context creation.

metadata
Metadata · object

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

provider_id
string<uuid> | null

Response

Successful Response

id
string<uuid>
required
created_by
string<uuid>
required
created_at
string<date-time>
updated_at
string<date-time>
last_active_at
string<date-time>
provider_id
string<uuid> | null
metadata
Metadata · object

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.