Back

MessageBird
Description
Plugin for communicating with your customers, for marketing and customer service.
Details
https://sparkpost.com/.well-known/ai-plugin.json
{
"schema_version": "v1",
"name_for_human": "MessageBird",
"name_for_model": "messagebird",
"description_for_human": "Plugin for communicating with your customers, for marketing and customer service.",
"description_for_model": "Communicate with your customers",
"auth": {
"type": "oauth",
"instructions": "",
"client_url": "https://app.messagebird.com/oauth2/auth",
"scope": "",
"authorization_url": "https://nest.messagebird.com/auth/oauth2/token",
"authorization_content_type": "application/x-www-form-urlencoded",
"verification_tokens": {
"openai": "aed5c44f02824921a9098dec3a46496f"
}
},
"api": {
"type": "openapi",
"url": "https://messagebird.com/.well-known/openapi.yaml",
"is_user_authenticated": true
},
"logo_url": "https://messagebird.com/.well-known/logomark.png",
"contact_email": "support@messagebird.com",
"legal_info_url": "https://messagebird.com/legal"
}
https://messagebird.com/.well-known/openapi.yaml
openapi: 3.0.3
info:
title: MessageBird API Reference
description: Communicate with your customers
version: 1.0.0
license:
name: "Apache 2.0"
url: "https://www.apache.org/licenses/LICENSE-2.0.html"
x-logo:
url: https://messagebird.com/.well-known/logo.png
contact:
name: MessageBird
url: https://messagebird.com
servers:
- url: https://nest.messagebird.com
paths:
/me:
get:
summary: Get profile
description: Retrieve the profile of the currently logged in user.
operationId: getMe
tags:
- profile
security:
- HTTPBearer: []
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
title: User
description: The user record
properties:
id:
type: string
description: ID of the user
format: uuid
status:
type: string
enum:
- pending
- active
- deleted
- invited
default: pending
description: The status of the user
name:
type: string
description: The display name for the user
bio:
type: string
description: The user's description
activeSessions:
type: integer
minimum: 0
description: The number of logged in session for the user.
createdAt:
type: string
format: date-time
description: When the user was created.
updatedAt:
type: string
format: date-time
description: When the user was last updated.
emails:
type: array
description: Email addresses associated with user.
items:
type: object
title: UserEmail
description: A known email address for the user.
additionalProperties: false
properties:
id:
type: string
description: ID of the email record.
format: uuid
userId:
type: string
description: ID of the user this record is associated with.
format: uuid
email:
type: string
format: email
description: The email address.
verified:
type: boolean
description: Whether the email address is verified.
passwordSet:
type: boolean
description: Whether there is a password set for this email address.
tokenSet:
type: boolean
description: Whether there is a token set for this email address.
createdAt:
type: string
format: date-time
description: When this record was created.
updatedAt:
type: string
format: date-time
description: When this record was last updated.
required:
- id
- userId
- email
- verified
- passwordSet
- tokenSet
- createdAt
identities:
type: array
description: Third-party identities associated with user.
items:
type: object
title: UserIdentity
additionalProperties: false
properties:
id:
type: string
description: The ID of the user on the third-party provider.
name:
type: string
description: The name of the user on the third-party provider.
email:
type: string
description: The email of the user on the third-party provider.
avatarUrl:
type: string
description: The avatar URL of the user on the third-party provider.
provider:
type: string
description: The name of the provider
createdAt:
type: string
format: date-time
description: Timestamp when the identity was created.
updatedAt:
type: string
format: date-time
description: Timestamp when the identity was last updated.
avatarUrl:
type: string
description: URL to the user's profile picture.
phoneNumber:
type: string
format: phone-number
description: The phone number associated with the user.
locale:
type: string
format: locale-bcp47
description: The locale for the user.
timezone:
type: string
format: zoneinfo
description: The default timezone for the user.
required:
- id
- status
- name
- activeSessions
- createdAt
- updatedAt
- emails
"401":
description: unauthorized request
content:
application/json:
schema:
type: object
required:
- code
- message
properties:
code:
type: string
description: Unique identifier for the error that occurred
message:
type: string
description: Description of the error that occurred, aimed at API consumers
example:
code: InvalidToken
message: Token is missing, malformed, invalid or has expired
/me/memberships:
get:
summary: List organization memberships
description: Retrieve a list of all organizations the user is a member of
operationId: listOrganizationMemberships
security:
- HTTPBearer: []
tags:
- organization_membership
parameters:
- name: limit
description: Limits the number of results to return
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 10
- name: reverse
description: Order in which to retrieve the results
in: query
schema:
type: boolean
default: false
- name: pageToken
description: Pagination token that keeps of track of the current position in the list
in: query
schema:
type: string
maxLength: 8000
- name: status
in: query
required: false
schema:
type: string
description: The status of user's membership on the organization.
enum:
- invited
- active
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: object
title: OrganizationMembership
additionalProperties: false
properties:
organization:
type: object
title: OrganizationPreview
description: Simplified view of the Organization object
additionalProperties: false
properties:
id:
type: string
format: uuid
description: ID of the organization.
name:
type: string
description: Name of the organization.
slug:
type: string
description: Slug of the organization.
avatarUrl:
type: string
description: URL to the organization's profile picture.
createdAt:
type: string
format: date-time
description: Timestamp of when the organization was created.
required:
- id
- name
- slug
- createdAt
status:
type: string
description: The status of user's membership on the organization.
enum:
- invited
- active
createdAt:
type: string
format: date-time
description: When the membership was created.
updatedAt:
type: string
format: date-time
description: When the membership was last updated.
roleIds:
type: array
description: IDs of IAM roles assigned to the user.
items:
type: string
format: uuid
required:
- organization
- status
- createdAt
- updatedAt
- roleIds
nextPageToken:
type: string
description: The token that can be passed as pageToken in URL to retrieve the
next set of results. If missing, no more results to display.
"422":
description: Request validation failed
content:
application/json:
schema:
type: object
required:
- code
- message
properties:
code:
type: string
description: Unique identifier for the error that occurred
message:
type: string
description: Description of the error that occurred, aimed at API consumers
details:
type: object
description: Detailed information on where the error exists, usually the field
name on the request payload
additionalProperties:
type: array
description: The error description for the specific detail
items:
type: string
example:
code: InvalidPayload
message: One or more fields provided in the request body are malformed
details:
.name:
- Property 'name' is required
"/workspaces/{workspaceId}/contacts":
get:
summary: List Contacts
operationId: listContacts
description: Retrieve a list of all contacts
tags:
- contacts
security:
- HTTPBearer: []
parameters:
- in: path
name: workspaceId
required: true
schema:
type: string
- name: limit
description: Limits the number of results to return
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 10
- name: pageToken
description: Pagination token that keeps of track of the current position in the list
in: query
schema:
type: string
maxLength: 8000
- name: reverse
description: Order in which to retrieve the results
in: query
schema:
type: boolean
default: false
- name: identifierKey
in: query
schema:
type: string
minimum: 1
maximum: 250
- name: identifierValue
in: query
schema:
type: string
minimum: 1
maximum: 250
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
required:
- results
properties:
results:
type: array
items:
type: object
additionalProperties: false
required:
- id
- createdAt
- updatedAt
properties:
id:
type: string
computedDisplayName:
type: string
displayName:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
workspaceId:
type: string
firstName:
type: string
lastName:
type: string
gender:
type: string
avatarUrl:
type: string
pattern: ^$|^https://
locales:
type: array
items:
type: string
format: locale-bcp47
country:
type: string
featuredIdentifiers:
type: array
items:
type: object
title: IdentifierRef
additionalProperties: false
properties:
key:
type: string
value:
type: string
required:
- key
- value
attributes:
items:
type: object
additionalProperties:
oneOf:
- type: boolean
- type: number
- type: string
- type: array
items:
type: boolean
minItems: 1
- type: array
items:
type: number
minItems: 1
- type: array
items:
type: string
minItems: 1
identifierCount:
type: integer
nextPageToken:
type: string
description: The token that can be passed as pageToken in URL to retrieve the
next set of results. If missing, no more results to display.
"404":
description: Workspace not found
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- code
- message
properties:
code:
type: string
minLength: 5
message:
type: string
minLength: 5
"/organizations/{organizationId}/workspaces":
get:
summary: List workspaces
description: List the workspaces for the organization.
operationId: listWorkspaces
security:
- HTTPBearer: []
tags:
- organization_workspace
parameters:
- name: organizationId
description: The organization ID
in: path
required: true
schema:
type: string
- name: limit
description: Limits the number of results to return
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 10
- name: reverse
description: Order in which to retrieve the results
in: query
schema:
type: boolean
default: false
- name: pageToken
description: Pagination token that keeps of track of the current position in the list
in: query
schema:
type: string
maxLength: 8000
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
description: List of workspaces.
additionalProperties: false
properties:
results:
type: array
description: List of results.
items:
title: Workspace
description: The workspace record.
type: object
additionalProperties: false
properties:
id:
type: string
description: Workspace ID.
format: uuid
organizationId:
type: string
description: ID of the organization this workspace is part of.
format: uuid
status:
type: string
enum:
- active
default: active
description: Current status
name:
type: string
description: The display name for the workspace
minLength: 4
maxLength: 60
description:
type: string
description: The description for the workspace
minLength: 1
maxLength: 240
dataPolicy:
type: object
title: DataPolicy
description: The data storage policy for a resource.
properties:
group:
type: string
description: The name of the region group used for storage.
example: eu
regions:
type: array
items:
type: object
title: RegionPriority
properties:
region:
type: string
description: The name of the AWS region.
example: eu-west-1
priority:
type: integer
minimum: 0
description: The priority to give to this region when storing data.
required:
- region
- priority
required:
- group
- regions
createdAt:
type: string
format: date-time
description: When the workspace was created.
updatedAt:
type: string
format: date-time
description: When the workspace was last updated.
required:
- id
- organizationId
- status
- name
- dataPolicy
- createdAt
- updatedAt
nextPageToken:
type: string
description: The token that can be passed as pageToken in URL to retrieve the
next set of results. If missing, no more results to display.
"401":
description: unauthorized request
content:
application/json:
schema:
type: object
required:
- code
- message
properties:
code:
type: string
description: Unique identifier for the error that occurred
message:
type: string
description: Description of the error that occurred, aimed at API consumers
example:
code: InvalidToken
message: Token is missing, malformed, invalid or has expired
"404":
description: Resource not found
content:
application/json:
schema:
type: object
required:
- code
- message
properties:
code:
type: string
description: Unique identifier for the error that occurred
message:
type: string
description: Description of the error that occurred, aimed at API consumers
example:
code: ResourceNotFound
message: The requested resource does not exist
"/workspaces/{workspaceId}/channels":
get:
summary: Get workspace channels
operationId: getWorkspaceChannels
description: Get the channels configured for a workspace
security:
- HTTPBearer: []
tags:
- channel
parameters:
- name: workspaceId
description: The ID of the workspace
in: path
required: true
schema:
type: string
format: uuid
- name: limit
description: Limits the number of results to return
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 10
- name: pageToken
description: Pagination token that keeps of track of the current position in the list
in: query
schema:
type: string
maxLength: 8000
- name: reverse
description: Order in which to retrieve the results
in: query
schema:
type: boolean
default: false
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
title: ChannelList
description: A list of channels
properties:
results:
type: array
items:
properties:
id:
type: string
format: uuid
platformId:
type: string
pattern: ^[A-Za-z0-9-]+$
minLength: 3
maxLength: 60
name:
type: string
minLength: 1
maxLength: 100
connectorId:
type: string
format: uuid
identifier:
type: string
minLength: 1
maxLength: 100
status:
type: string
enum:
- active
- pending
- setting-up
- failed
- inactive
- deleted
contactIdentifierKeyOverride:
type: string
pattern: ^[A-Za-z0-9_-]+$
nullable: true
contactIdentifierFormatOverride:
type: object
additionalProperties: false
properties:
type:
type: string
enum:
- none
- pattern
- phonenumber
- emailaddress
pattern:
type: string
nullable: true
platformServiceUrlOverride:
type: string
pattern: ^https://
nullable: true
platformServiceVersionOverride:
type: string
enum:
- "1.0"
nullable: true
platformServiceProtocolOverride:
type: string
enum:
- http
- https
nullable: true
platformMessageJsonSchemaOverride:
type: object
nullable: true
settings:
type: array
items:
type: object
required:
- key
- value
connectionParams:
type: array
items:
type: object
required:
- key
- value
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
required:
- id
- name
- platformId
- connectorId
- status
- createdAt
nextPageToken:
type: string
description: The token that can be passed as pageToken in URL to retrieve the
next set of results. If missing, no more results to display.
"404":
description: The request did not pass validation
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
examples:
resourceNotFound:
value:
code: ResourceNotFound
message: The requested resource does not exist
resourceAlreadyExists:
value:
code: ResourceAlreadyExists
message: A unique constraint prevented the resource from getting created
"/workspaces/{workspaceId}/channels/{channelId}/messages":
get:
summary: Get messages from a channel
operationId: listChannelMessages
description: Get a list of messages from a channel
security:
- HTTPBearer: []
tags:
- channel_message
parameters:
- name: channelId
description: The ID for a channel
in: path
required: true
schema:
type: string
format: uuid
- name: workspaceId
description: The ID of the workspace
in: path
required: true
schema:
type: string
format: uuid
- name: limit
description: Limits the number of results to return
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 10
- name: pageToken
description: Pagination token that keeps of track of the current position in the list
in: query
schema:
type: string
maxLength: 8000
- name: reverse
description: Order in which to retrieve the results
in: query
schema:
type: boolean
default: false
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
title: ChannelMessageList
description: A list of channel messages
properties:
results:
type: array
items:
type: object
title: ChannelMessage
additionalProperties: false
properties:
id:
type: string
format: uuid
channelId:
type: string
format: uuid
sender:
oneOf:
- type: object
title: ChannelConnector
additionalProperties: false
properties:
connector:
type: object
properties:
id:
type: string
format: uuid
required:
- id
required:
- connector
- type: object
title: ChannelContact
additionalProperties: false
properties:
contact:
type: object
properties:
id:
type: string
identifierKey:
type: string
identifierValue:
type: string
type:
type: string
required:
- id
- identifierKey
- identifierValue
required:
- contact
receiver:
oneOf:
- type: object
title: ChannelConnector
additionalProperties: false
properties:
connector:
type: object
properties:
id:
type: string
format: uuid
required:
- id
required:
- connector
- type: object
title: ChannelContacts
additionalProperties: false
properties:
contacts:
type: array
minLength: 1
items:
type: object
additionalProperties: false
properties:
id:
type: string
identifierKey:
type: string
identifierValue:
type: string
type:
type: string
required:
- contacts
context:
type: object
nullable: true
additionalProperties: false
properties:
type:
type: string
id:
type: string
body:
type: object
title: MessageBody
nullable: true
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- text
- html
- image
- file
- gif
- location
- carousel
- list
- section
- oneOf:
- type: object
required:
- text
- type
additionalProperties: false
properties:
type:
type: string
enum:
- text
text:
type: object
additionalProperties: false
required:
- text
properties:
text:
type: string
minLength: 1
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- html
- type
additionalProperties: false
properties:
type:
type: string
enum:
- html
html:
type: object
additionalProperties: false
required:
- text
- html
properties:
text:
type: string
minLength: 1
html:
type: string
minLength: 1
attachments:
type: array
nullable: true
items:
type: object
additionalProperties: false
required:
- mediaUrl
- filename
properties:
mediaUrl:
type: string
format: uri
filename:
type: string
inline:
type: boolean
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- image
- type
additionalProperties: false
properties:
type:
type: string
enum:
- image
image:
type: object
additionalProperties: false
required:
- images
properties:
text:
type: string
images:
type: array
minLength: 1
items:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
mediaUrl:
type: string
format: uri
minLength: 1
altText:
type: string
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- file
- type
additionalProperties: false
properties:
type:
type: string
enum:
- file
file:
type: object
additionalProperties: false
required:
- files
properties:
text:
type: string
files:
type: array
minLength: 1
items:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
mediaUrl:
type: string
format: uri
minLength: 1
contentType:
type: string
minLength: 1
altText:
type: string
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- gif
- type
additionalProperties: false
properties:
type:
type: string
enum:
- gif
gif:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
text:
type: string
mediaUrl:
type: string
format: uri
minLength: 1
altText:
type: string
actions:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
- type: object
required:
- location
- type
additionalProperties: false
properties:
type:
type: string
enum:
- location
location:
type: object
additionalProperties: false
required:
- coordinates
properties:
coordinates:
type: object
additionalProperties: false
properties:
latitude:
type: number
format: float
minimum: -90
maximum: 90
longitude:
type: number
format: float
minimum: -180
maximum: 180
location:
type: object
additionalProperties: false
properties:
address:
type: string
label:
type: string
- type: object
required:
- carousel
- type
additionalProperties: false
properties:
type:
type: string
enum:
- carousel
carousel:
type: object
additionalProperties: false
required:
- items
properties:
items:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
- type: object
required:
- list
- type
additionalProperties: false
properties:
type:
type: string
enum:
- list
list:
type: object
additionalProperties: false
required:
- items
properties:
text:
type: string
items:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
# actions:
# $ref: "#/components/schemas/Channels_Actions"
# - type: object
# required:
# - section
# - type
# additionalProperties: false
# properties:
# type:
# type: string
# enum:
# - section
# section:
# type: object
# additionalProperties: false
# properties:
# items:
# type: array
# items:
# minLength: 1
# $ref: "#/components/schemas/Channels_SectionBody"
# configurations:
# type: object
# additionalProperties:
# type: string
# discriminator:
# propertyName: type
# mapping:
# text: "#/components/schemas/Channels_TypeText"
# html: "#/components/schemas/Channels_TypeHTML"
# image: "#/components/schemas/Channels_TypeImage"
# file: "#/components/schemas/Channels_TypeFile"
# gif: "#/components/schemas/Channels_TypeGif"
# location: "#/components/schemas/Channels_TypeLocation"
# carousel: "#/components/schemas/Channels_TypeCarousel"
# list: "#/components/schemas/Channels_TypeList"
# section: "#/components/schemas/Channels_TypeSection"
reference:
type: string
parts:
type: array
items:
type: object
additionalProperties: false
properties:
platformReference:
type: string
status:
type: string
enum:
- accepted
- processing
- sent
- sending_failed
- delivered
- delivery_failed
- deleted
reason:
type: string
direction:
type: string
enum:
- incoming
- outgoing
template:
type: object
nullable: true
required:
- projectId
- version
additionalProperties: false
properties:
projectId:
type: string
format: uuid
version:
type: string
locale:
type: string
format: locale-bcp47
variables:
nullable: true
type: object
properties:
default:
type: string
additionalProperties:
type: string
lastStatusAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
required:
- id
- channelId
- sender
- receiver
- body
- status
- lastStatusAt
- createdAt
- updatedAt
nextPageToken:
type: string
description: The token that can be passed as pageToken in URL to retrieve the
next set of results. If missing, no more results to display.
"404":
description: The request did not pass validation
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
examples:
resourceNotFound:
value:
code: ResourceNotFound
message: The requested resource does not exist
resourceAlreadyExists:
value:
code: ResourceAlreadyExists
message: A unique constraint prevented the resource from getting created
"422":
description: The request did not pass validation
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
type: array
items:
type: string
required:
- code
- message
examples:
validationFailed:
value:
code: MalformedRequest
message: One or more fields provided in the request body are malformed
details:
.name:
- Property 'name' is missing
.description:
- Maximum string length is 250
post:
summary: Create channel message
operationId: createChannelMessage
description: Create a channel message
security:
- HTTPBearer: []
tags:
- channel_message
x-features:
- name: lifecycleEventHooks
events:
- message_sent
- message_sending_failed
- message_delivered
- message_delivery_failed
- message_failed
parameters:
- name: channelId
description: The ID for a channel
in: path
required: true
schema:
type: string
format: uuid
- name: workspaceId
description: The ID of the workspace
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
type: object
title: ChannelMessageCreateWithBody
properties:
receiver:
oneOf:
- type: object
title: ChannelConnector
additionalProperties: false
properties:
connector:
type: object
properties:
id:
type: string
format: uuid
required:
- id
required:
- connector
- type: object
title: ChannelContacts
additionalProperties: false
properties:
contacts:
type: array
minLength: 1
items:
type: object
additionalProperties: false
properties:
id:
type: string
identifierKey:
type: string
identifierValue:
type: string
type:
type: string
required:
- contacts
context:
type: object
nullable: true
additionalProperties: false
properties:
type:
type: string
id:
type: string
reference:
type: string
body:
type: object
title: MessageBody
nullable: true
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- text
- html
- image
- file
- gif
- location
- carousel
- list
- section
- oneOf:
- type: object
required:
- text
- type
additionalProperties: false
properties:
type:
type: string
enum:
- text
text:
type: object
additionalProperties: false
required:
- text
properties:
text:
type: string
minLength: 1
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- html
- type
additionalProperties: false
properties:
type:
type: string
enum:
- html
html:
type: object
additionalProperties: false
required:
- text
- html
properties:
text:
type: string
minLength: 1
html:
type: string
minLength: 1
attachments:
type: array
nullable: true
items:
type: object
additionalProperties: false
required:
- mediaUrl
- filename
properties:
mediaUrl:
type: string
format: uri
filename:
type: string
inline:
type: boolean
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- image
- type
additionalProperties: false
properties:
type:
type: string
enum:
- image
image:
type: object
additionalProperties: false
required:
- images
properties:
text:
type: string
images:
type: array
minLength: 1
items:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
mediaUrl:
type: string
format: uri
minLength: 1
altText:
type: string
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- file
- type
additionalProperties: false
properties:
type:
type: string
enum:
- file
file:
type: object
additionalProperties: false
required:
- files
properties:
text:
type: string
files:
type: array
minLength: 1
items:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
mediaUrl:
type: string
format: uri
minLength: 1
contentType:
type: string
minLength: 1
altText:
type: string
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- gif
- type
additionalProperties: false
properties:
type:
type: string
enum:
- gif
gif:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
text:
type: string
mediaUrl:
type: string
format: uri
minLength: 1
altText:
type: string
actions:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
- type: object
required:
- location
- type
additionalProperties: false
properties:
type:
type: string
enum:
- location
location:
type: object
additionalProperties: false
required:
- coordinates
properties:
coordinates:
type: object
additionalProperties: false
properties:
latitude:
type: number
format: float
minimum: -90
maximum: 90
longitude:
type: number
format: float
minimum: -180
maximum: 180
location:
type: object
additionalProperties: false
properties:
address:
type: string
label:
type: string
- type: object
required:
- carousel
- type
additionalProperties: false
properties:
type:
type: string
enum:
- carousel
carousel:
type: object
additionalProperties: false
required:
- items
properties:
items:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
- type: object
required:
- list
- type
additionalProperties: false
properties:
type:
type: string
enum:
- list
list:
type: object
additionalProperties: false
required:
- items
properties:
text:
type: string
items:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
# actions:
# $ref: "#/components/schemas/Channels_Actions"
# - type: object
# required:
# - section
# - type
# additionalProperties: false
# properties:
# type:
# type: string
# enum:
# - section
# section:
# type: object
# additionalProperties: false
# properties:
# items:
# type: array
# items:
# minLength: 1
# $ref: "#/components/schemas/Channels_SectionBody"
# configurations:
# type: object
# additionalProperties:
# type: string
# discriminator:
# propertyName: type
# mapping:
# text: "#/components/schemas/Channels_TypeText"
# html: "#/components/schemas/Channels_TypeHTML"
# image: "#/components/schemas/Channels_TypeImage"
# file: "#/components/schemas/Channels_TypeFile"
# gif: "#/components/schemas/Channels_TypeGif"
# location: "#/components/schemas/Channels_TypeLocation"
# carousel: "#/components/schemas/Channels_TypeCarousel"
# list: "#/components/schemas/Channels_TypeList"
# section: "#/components/schemas/Channels_TypeSection"
required:
- body
responses:
"202":
description: Message was accepted for processing
content:
application/json:
schema:
type: object
title: ChannelMessage
additionalProperties: false
properties:
id:
type: string
format: uuid
channelId:
type: string
format: uuid
sender:
oneOf:
- type: object
title: ChannelConnector
additionalProperties: false
properties:
connector:
type: object
properties:
id:
type: string
format: uuid
required:
- id
required:
- connector
- type: object
title: ChannelContact
additionalProperties: false
properties:
contact:
type: object
properties:
id:
type: string
identifierKey:
type: string
identifierValue:
type: string
type:
type: string
required:
- id
- identifierKey
- identifierValue
required:
- contact
receiver:
oneOf:
- type: object
title: ChannelConnector
additionalProperties: false
properties:
connector:
type: object
properties:
id:
type: string
format: uuid
required:
- id
required:
- connector
- type: object
title: ChannelContacts
additionalProperties: false
properties:
contacts:
type: array
minLength: 1
items:
type: object
additionalProperties: false
properties:
id:
type: string
identifierKey:
type: string
identifierValue:
type: string
type:
type: string
required:
- contacts
context:
type: object
nullable: true
additionalProperties: false
properties:
type:
type: string
id:
type: string
body:
type: object
title: MessageBody
nullable: true
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- text
- html
- image
- file
- gif
- location
- carousel
- list
- section
- oneOf:
- type: object
required:
- text
- type
additionalProperties: false
properties:
type:
type: string
enum:
- text
text:
type: object
additionalProperties: false
required:
- text
properties:
text:
type: string
minLength: 1
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- html
- type
additionalProperties: false
properties:
type:
type: string
enum:
- html
html:
type: object
additionalProperties: false
required:
- text
- html
properties:
text:
type: string
minLength: 1
html:
type: string
minLength: 1
attachments:
type: array
nullable: true
items:
type: object
additionalProperties: false
required:
- mediaUrl
- filename
properties:
mediaUrl:
type: string
format: uri
filename:
type: string
inline:
type: boolean
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- image
- type
additionalProperties: false
properties:
type:
type: string
enum:
- image
image:
type: object
additionalProperties: false
required:
- images
properties:
text:
type: string
images:
type: array
minLength: 1
items:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
mediaUrl:
type: string
format: uri
minLength: 1
altText:
type: string
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- file
- type
additionalProperties: false
properties:
type:
type: string
enum:
- file
file:
type: object
additionalProperties: false
required:
- files
properties:
text:
type: string
files:
type: array
minLength: 1
items:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
mediaUrl:
type: string
format: uri
minLength: 1
contentType:
type: string
minLength: 1
altText:
type: string
actions:
type: array
nullable: true
items:
allOf:
- type: object
required:
- type
properties:
type:
type: string
enum:
- link
- reply
- locationRequest
- buy
- postback
- oneOf:
- type: object
required:
- link
- type
properties:
type:
type: string
enum:
- link
link:
type: object
required:
- text
- url
properties:
text:
type: string
url:
type: string
format: uri
metadata:
type: object
additionalProperties:
type: string
- type: object
required:
- reply
- type
properties:
type:
type: string
enum:
- reply
reply:
type: object
properties:
text:
type: string
imageUrl:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- locationRequest
- type
properties:
type:
type: string
enum:
- locationRequest
locationRequest:
type: object
properties:
text:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- type: object
required:
- buy
- type
properties:
type:
type: string
enum:
- buy
buy:
type: object
properties:
text:
type: string
amountCents:
type: integer
currency:
type: string
minLength: 3
maxLength: 3
metadata:
type: object
additionalProperties:
type: string
required:
- text
- amountCents
- currency
- type: object
required:
- postback
- type
properties:
type:
type: string
enum:
- postback
postback:
type: object
properties:
text:
type: string
payload:
type: string
metadata:
type: object
additionalProperties:
type: string
required:
- text
- payload
# discriminator:
# propertyName: type
# mapping:
# link: "#/components/schemas/Channels_ActionLink"
# reply: "#/components/schemas/Channels_ActionReply"
# locationRequest: "#/components/schemas/Channels_ActionLocationRequest"
# buy: "#/components/schemas/Channels_ActionBuy"
# postback: "#/components/schemas/Channels_ActionPostback"
- type: object
required:
- gif
- type
additionalProperties: false
properties:
type:
type: string
enum:
- gif
gif:
type: object
additionalProperties: false
required:
- mediaUrl
properties:
text:
type: string
mediaUrl:
type: string
format: uri
minLength: 1
altText:
type: string
actions:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
- type: object
required:
- location
- type
additionalProperties: false
properties:
type:
type: string
enum:
- location
location:
type: object
additionalProperties: false
required:
- coordinates
properties:
coordinates:
type: object
additionalProperties: false
properties:
latitude:
type: number
format: float
minimum: -90
maximum: 90
longitude:
type: number
format: float
minimum: -180
maximum: 180
location:
type: object
additionalProperties: false
properties:
address:
type: string
label:
type: string
- type: object
required:
- carousel
- type
additionalProperties: false
properties:
type:
type: string
enum:
- carousel
carousel:
type: object
additionalProperties: false
required:
- items
properties:
items:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
- type: object
required:
- list
- type
additionalProperties: false
properties:
type:
type: string
enum:
- list
list:
type: object
additionalProperties: false
required:
- items
properties:
text:
type: string
items:
type: array
minLength: 1
items:
type: object
required:
- title
additionalProperties: false
properties:
title:
type: string
minLength: 1
mediaUrl:
type: string
format: uri
nullable: true
description:
type: string
altText:
type: string
# actions:
# $ref: "#/components/schemas/Channels_Actions"
# actions:
# $ref: "#/components/schemas/Channels_Actions"
# - type: object
# required:
# - section
# - type
# additionalProperties: false
# properties:
# type:
# type: string
# enum:
# - section
# section:
# type: object
# additionalProperties: false
# properties:
# items:
# type: array
# items:
# minLength: 1
# $ref: "#/components/schemas/Channels_SectionBody"
# configurations:
# type: object
# additionalProperties:
# type: string
# discriminator:
# propertyName: type
# mapping:
# text: "#/components/schemas/Channels_TypeText"
# html: "#/components/schemas/Channels_TypeHTML"
# image: "#/components/schemas/Channels_TypeImage"
# file: "#/components/schemas/Channels_TypeFile"
# gif: "#/components/schemas/Channels_TypeGif"
# location: "#/components/schemas/Channels_TypeLocation"
# carousel: "#/components/schemas/Channels_TypeCarousel"
# list: "#/components/schemas/Channels_TypeList"
# section: "#/components/schemas/Channels_TypeSection"
reference:
type: string
parts:
type: array
items:
type: object
additionalProperties: false
properties:
platformReference:
type: string
status:
type: string
enum:
- accepted
- processing
- sent
- sending_failed
- delivered
- delivery_failed
- deleted
reason:
type: string
direction:
type: string
enum:
- incoming
- outgoing
template:
type: object
nullable: true
required:
- projectId
- version
additionalProperties: false
properties:
projectId:
type: string
format: uuid
version:
type: string
locale:
type: string
format: locale-bcp47
variables:
nullable: true
type: object
properties:
default:
type: string
additionalProperties:
type: string
lastStatusAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
required:
- id
- channelId
- sender
- receiver
- body
- status
- lastStatusAt
- createdAt
- updatedAt
"400":
description: The request did not pass validation
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
examples:
resourceNotFound:
value:
code: ResourceNotFound
message: The requested resource does not exist
resourceAlreadyExists:
value:
code: ResourceAlreadyExists
message: A unique constraint prevented the resource from getting created
"404":
description: The request did not pass validation
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
examples:
resourceNotFound:
value:
code: ResourceNotFound
message: The requested resource does not exist
resourceAlreadyExists:
value:
code: ResourceAlreadyExists
message: A unique constraint prevented the resource from getting created
"422":
description: The request did not pass validation
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
type: array
items:
type: string
required:
- code
- message
examples:
validationFailed:
value:
code: MalformedRequest
message: One or more fields provided in the request body are malformed
details:
.name:
- Property 'name' is missing
.description:
- Maximum string length is 250
components:
schemas:
Contacts_contactId:
title: Contact ID
description: The ID of the contact.
type: string
format: uuid
parameters:
Contacts_workspaceId:
name: workspaceId
required: true
in: path
schema:
type: string
securitySchemes:
HTTPBearer:
type: http
scheme: bearer