Skip to main content
POST
/
sources
Create a source
curl --request POST \
  --url https://api.deck.co/v2/sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "website": {
    "url": "<string>"
  },
  "name": "<string>"
}
'
{
  "id": "<string>",
  "object": "<string>",
  "name": "<string>",
  "type": "<string>",
  "website": {
    "url": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Body

Request body for creating a new source.

type
string
required

Source type. Use website for web-based sources.

website
object
required

Website configuration for the source.

name
null | string

Display name for the source.

Response

OK

A source object. Sources are websites or services that agents connect to.

id
string
required

Unique identifier for the source, prefixed with src_.

object
string
required

Always source.

name
null | string
required

Display name for the source.

type
string
required

Source type. Use website for web-based sources.

website
object
required

Website configuration for the source.

created_at
string<date-time>
required

ISO 8601 timestamp of when the resource was created.

updated_at
string<date-time>
required

ISO 8601 timestamp of when the resource was last updated.

request_id
string
required

Unique identifier for the API request. Include this when contacting support.