Federated Search - External Content Type API

This API is for managing external types. The types defined here can be used for filtering search results in the Help Center front end. Types refer to the kind of entity a record is, for example: a blog post, a bug report etc. Use descriptive names that will help your users understand and navigate your content.

Allowed for:
  • Help Center managers

JSON Format

Types are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
created_at string false false ISO-8601 compliant date-time reflecting the time the event was created. If not set, the API sets the value when it receives the event
id string true false Universally Unique Lexicographically Sortable Identifier. More info: https://github.com/ulid/spec
name string false true The name of the type that will be displayed in the Help Center frontend.
updated_at string false false ISO-8601 compliant date-time reflecting the time the event was last updated.

Lists external types

  • GET /api/v2/guide/external_content/types

Lists external types

Parameters
Name Type In Required Description
page object Query false Paginate query
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types" \
  -u {email_address}:{password}
curl -g "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types?page[after]={after_cursor}" \
  -u {email_address}:{password}
curl -g "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types?page[before]={before_cursor}" \
  -u {email_address}:{password}
Example Response
Status 200 OK

{
  "meta": {
    "after_cursor": "MG",
    "before_cursor": "MQ",
    "has_more": true
  },
  "types": [
    {
      "created_at": "2020-05-01T09:12:20Z",
      "id": "01EBDWWC98ZF7DK9YQF3DK9Y77",
      "name": "Book",
      "updated_at": "2020-05-26T09:11:30Z"
    }
  ]
}

Creates an external content type

  • POST /api/v2/guide/external_content/types

Creates an external content type

Example Body
{
  "type": {
    "name": "Book"
  }
}
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types" -d '{"type": { "name": "Book" }}'\
  -u {email_address}:{password}
Example Response
Status 201 Created

{
  "type": {
    "created_at": "2020-05-01T09:12:20Z",
    "id": "01E7H2DC2EDTK45NZTFGFAAA1N",
    "name": "Book",
    "updated_at": "2020-05-26T09:11:30Z"
  }
}

Get an external type

  • GET /api/v2/guide/external_content/types/{id}

Return the type corresponding to the given ID

Parameters
Name Type In Required Description
id string Path true ULID for the object
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types/{id}" \
  -u {email_address}:{password}
Example Response
Status 200 OK

{
  "type": {
    "created_at": "2020-05-01T09:12:20Z",
    "id": "01E7H2DC2EDTK45NZTFGFAAA1N",
    "name": "Book",
    "updated_at": "2020-05-26T09:11:30Z"
  }
}

Updates a type

  • PUT /api/v2/guide/external_content/types/{id}

Update the type corresponding to the given ID with the request body

Parameters
Name Type In Required Description
id string Path true ULID for the object
Example Body
{
  "type": {
    "name": "Book"
  }
}
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types/{id}" -X PUT -d '{"type": { "name": "Book" }}'\
  -u {email_address}:{password}
Example Response
Status 200 OK

{
  "type": {
    "created_at": "2020-05-01T09:12:20Z",
    "id": "01E7H2DC2EDTK45NZTFGFAAA1N",
    "name": "Book",
    "updated_at": "2020-05-26T09:11:30Z"
  }
}

Deletes a type

  • DELETE /api/v2/guide/external_content/types/{id}

Delete the type corresponding to the given ID

Parameters
Name Type In Required Description
id string Path true ULID for the object
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/types/{id}" -X DELETE \
  -u {email_address}:{password}
Example Response
Status 204 No Content