{
  "opencollection": "1.0.0",
  "info": {
    "name": "Dyspatch Blocks Drafts API",
    "version": "2026.06"
  },
  "items": [
    {
      "info": {
        "name": "Drafts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Drafts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.dyspatch.io/drafts",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "A cursor value used to retrieve a specific page from a paginated result set."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Filter the list of drafts by a particular status"
              },
              {
                "name": "templateId",
                "value": "",
                "type": "query",
                "description": "Filter drafts by template ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Returns all Email drafts for your organization."
        },
        {
          "info": {
            "name": "Submit Draft for Approval",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.dyspatch.io/drafts/:draftId/publishRequest",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Moves the Email draft into submitted state."
        },
        {
          "info": {
            "name": "Approve Draft",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.dyspatch.io/drafts/:draftId/publish/approve",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Approves an Email draft that is in Design or Publish review."
        },
        {
          "info": {
            "name": "Approve Draft For All Reviewers",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.dyspatch.io/drafts/:draftId/publish/approveAll",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Approves an Email draft that is in Design or Publish review for all reviewers."
        },
        {
          "info": {
            "name": "Reject Draft",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.dyspatch.io/drafts/:draftId/publish/reject",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Rejects an Email draft that is in Design or Publish review."
        },
        {
          "info": {
            "name": "Duplicate Draft",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.dyspatch.io/drafts/:draftId/duplicate",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Creates a copy of an Email draft with a new name."
        },
        {
          "info": {
            "name": "Lock Draft for Translation",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.dyspatch.io/drafts/:draftId/lockForTranslation",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Locks an Email draft to prevent edits while translations are being completed."
        },
        {
          "info": {
            "name": "Unlock Draft for Translation",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.dyspatch.io/drafts/:draftId/lockForTranslation",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Unlocks an Email draft to allow edits after translations are completed."
        },
        {
          "info": {
            "name": "Get Draft by ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.dyspatch.io/drafts/:draftId",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              },
              {
                "name": "targetLanguage",
                "value": "",
                "type": "query",
                "description": "The type of templating language to use when compiling the content."
              },
              {
                "name": "themeId",
                "value": "",
                "type": "query",
                "description": "A theme ID to use when rendering"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Gets a Email draft object with the matching ID. The \"compiled\" field will contain the template in the default, unlocalized form."
        },
        {
          "info": {
            "name": "Archive Draft",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.dyspatch.io/drafts/:draftId",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Archives an Email draft by marking it as deleted."
        },
        {
          "info": {
            "name": "Get Localizations on a Draft",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.dyspatch.io/drafts/:draftId/localizations",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Returns localization metadata for the Email draft"
        },
        {
          "info": {
            "name": "Create or Update a Localization",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.dyspatch.io/drafts/:draftId/localizations/:languageId",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              },
              {
                "name": "languageId",
                "value": "",
                "type": "path",
                "description": "A language ID (eg: en-US)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Inserts a localization or sets the name on an existing localization that already uses the languageId"
        },
        {
          "info": {
            "name": "Remove a Localization from Draft",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.dyspatch.io/drafts/:draftId/localizations/:languageId",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              },
              {
                "name": "languageId",
                "value": "",
                "type": "path",
                "description": "A language ID (eg: en-US)"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Deletes the localization with the given language ID if it exists"
        },
        {
          "info": {
            "name": "Get Draft Translations for Language",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.dyspatch.io/drafts/:draftId/localizations/:languageId/translations",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              },
              {
                "name": "languageId",
                "value": "",
                "type": "path",
                "description": "A language ID (eg: en-US)"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Returns the translations for the given language in key/value pairs."
        },
        {
          "info": {
            "name": "Set Draft Translations for Language",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.dyspatch.io/drafts/:draftId/localizations/:languageId/translations",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              },
              {
                "name": "languageId",
                "value": "",
                "type": "path",
                "description": "A language ID (eg: en-US)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format `%(my_variable)s` and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set `Content-Type` header to `application/json`. For gettext PO format set `Content-Type` header to `text/x-gettext-translation`."
        },
        {
          "info": {
            "name": "Get Draft Localization Keys",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.dyspatch.io/drafts/:draftId/localizationKeys",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "draftId",
                "value": "",
                "type": "path",
                "description": "A draft ID"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2026.06+json` to get a JSON object, or `text/vnd.dyspatch.2026.06+x-gettext-translation` to get the POT file."
        }
      ]
    }
  ],
  "bundled": true
}