Create Webhook Subscription
POST
/v2/webhook/subscription
Code sample: cURL
curl --location --request POST 'https://api.ouraring.com/v2/webhook/subscription' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret' --header 'Content-Type: application/json' --data-raw '{ "callback_url": "https://my-api/oura/tag/delete", "verification_token": "123", "event_type": "delete", "data_type": "tag"}'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CreateWebhookSubscriptionRequest
object
callback_url
required
Callback Url
string
verification_token
required
Verification Token
string
event_type
required
WebhookOperation
string
data_type
required
ExtApiV2DataType
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
WebhookSubscriptionModel
object
id
required
Id
string format: uuid4
callback_url
required
Callback Url
string
event_type
required
WebhookOperation
string
data_type
required
ExtApiV2DataType
string
expiration_time
required
Expiration Time
string format: date-time
Example
{ "event_type": "create", "data_type": "tag"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}