Skip to main content
POST
/
v0
/
contract-subscription
Create a new subscription for a contract
curl --request POST \
  --url https://{hostname}.gable.ai/v0/contract-subscription \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "dataContractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "<string>",
  "githubHandle": "<string>",
  "slackChannel": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dataContractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "<string>",
  "githubHandle": "<string>",
  "slackChannel": "<string>"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Subscription to create

dataContractId
string<uuid>
required

Unique identifier of the contract

userId
string<uuid>

The unique identifier of the user

email
string

The email address of the subscriber if provided

githubHandle
string

The GitHub handle of the subscriber

slackChannel
string

The Slack channel where contract violations will be sent

Response

Contract subscription was successfully created

id
string<uuid>
required

The unique identifier of the subscription

dataContractId
string<uuid>
required

Unique identifier of the contract

userId
string<uuid>

The unique identifier of the user

email
string

The email address of the subscriber if provided

githubHandle
string

The GitHub handle of the subscriber if provided

slackChannel
string

The Slack channel where contract violations will be sent