Core resources

Templates

Reusable documents with roles and fields. Use one or several to create an envelope, share them with members, and keep them in folders.

List templates

GET/api/v1/templates

Templates the caller may use, by view; with deleted=true the Deleted view

The live templates the caller may use, by name: their own, those shared with them (directly, through a group, or with the whole account) and, for an administrator, every one. view narrows the list: owned, shared (Shared with me: another member's templates a share reaches the caller by) or favourites (the caller's starred ones). With deleted=true, the deleted templates the caller owns (every one for an administrator), kept whole and restorable, most recently deleted first. Any other value is 422.

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Query parameters

  • deletedstring

    true: the Deleted view.

    One of true, false

  • viewstring

    all (default), owned, shared (Shared with me) or favourites.

    One of all, owned, shared, favourites

  • folderstring

    One of the caller's template folders (another member's matches nothing), or none: in none of the caller's folders. Each item carries the caller's folder_id (or null).

Returns

200 with a TemplateList object.

GET/api/v1/templates

curl

curl https://sign.example.com/api/v1/templates \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.listTemplates();

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.list_templates()
Response200
{
  "items": [
    {
      "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
      "name": "Mutual NDA",
      "version": 3,
      "email_subject": "example",
      "email_message": "example",
      "roles": [
        {}
      ],
      "documents": [
        {}
      ],
      "fields": [
        {}
      ],
      "access": "owner",
      "favourite": false,
      "shared": false,
      "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
    }
  ]
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Create template

POST/api/v1/templates

Create a template with roles

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

Request body

Content type application/json · required

Returns

201 with a Template object.

POST/api/v1/templates

curl

curl -X POST https://sign.example.com/api/v1/templates \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Mutual NDA",
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {
      "name": "Mutual NDA",
      "type": "signer"
    }
  ]
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.createTemplate({
  idempotencyKey: "order-1042",
  body: {
    "name": "Mutual NDA",
    "email_subject": "example",
    "email_message": "example",
    "roles": [
      {
        "name": "Mutual NDA",
        "type": "signer"
      }
    ]
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.create_template(
    idempotency_key="order-1042",
    body={
        "name": "Mutual NDA",
        "email_subject": "example",
        "email_message": "example",
        "roles": [
            {
                "name": "Mutual NDA",
                "type": "signer",
            },
        ],
    },
)
Response201
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Get template

GET/api/v1/templates/{id}

A template and its roles

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Returns

200 with a Template object.

GET/api/v1/templates/{id}

curl

curl https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.getTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.get_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
)
Response200
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Update template

PATCH/api/v1/templates/{id}

Rename a template or change its email subject and message (If-Match required)

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Request body

Content type application/json · required

Returns

200 with a Template object.

PATCH/api/v1/templates/{id}

curl

curl -X PATCH https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"' \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Mutual NDA",
  "email_subject": "example",
  "email_message": "example"
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.patchTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  ifMatch: '"v3"',
  body: {
    "name": "Mutual NDA",
    "email_subject": "example",
    "email_message": "example"
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.patch_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    if_match="\"v3\"",
    body={
        "name": "Mutual NDA",
        "email_subject": "example",
        "email_message": "example",
    },
)
Response200
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Delete template

DELETE/api/v1/templates/{id}

Move a live template to the Deleted view, kept whole; delete one already there for good, with its roles, documents and fields; envelopes made from it keep their copies

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Returns

204 Done with no body.

DELETE/api/v1/templates/{id}

curl

curl -X DELETE https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.deleteTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  ifMatch: '"v3"',
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.delete_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    if_match="\"v3\"",
)
Response204

No body.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Restore template

POST/api/v1/templates/{id}/restore

Bring a template of the Deleted view back, with everything it had

If-Match is honoured when given. A live template, or none, is 404. The body is empty or {}.

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

  • If-Matchstring

    "v<version>"

Returns

200 with a Template object.

POST/api/v1/templates/{id}/restore

curl

curl -X POST https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/restore \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H 'If-Match: "v3"'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.restoreTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  idempotencyKey: "order-1042",
  ifMatch: '"v3"',
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.restore_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    idempotency_key="order-1042",
    if_match="\"v3\"",
)
Response200
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

List template shares

GET/api/v1/templates/{id}/shares

Whom a template is shared with; its owner's or an administrator's

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Returns

200 with a TemplateShares object.

GET/api/v1/templates/{id}/shares

curl

curl https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/shares \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.listTemplateShares({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.list_template_shares(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
)
Response200
{
  "items": [
    {
      "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
      "can_edit": false,
      "user": {},
      "group": {},
      "account": false
    }
  ]
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Replace template shares

PUT/api/v1/templates/{id}/shares

Replace a template's shares with members, groups or the whole account

The whole set of shares. A user is a member of this account, named by id or email; a group is one of its groups. Sharing with the owner, or naming one target twice, is 422. A share lets its members use the template, and edit it with can_edit; deleting, restoring and sharing stay with the owner and administrators. Anyone without access is answered 404, too little access 403.

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Request body

Content type application/json · required

  • itemsarray of objectRequired

    at most 500 items

    Child attributes of items

Returns

200 with a TemplateShares object.

Limits

  • Template shares (PUT /templates/{id}/shares, UXW-06): shares per template; a member's email: 0–500; 3–320 bytes after trimming
PUT/api/v1/templates/{id}/shares

curl

curl -X PUT https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/shares \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {}
  ]
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.replaceTemplateShares({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  body: {
    "items": [
      {}
    ]
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.replace_template_shares(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    body={
        "items": [
            {},
        ],
    },
)
Response200
{
  "items": [
    {
      "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
      "can_edit": false,
      "user": {},
      "group": {},
      "account": false
    }
  ]
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Favourite template

PUT/api/v1/templates/{id}/favourite

Star a template for the caller (Favourites); idempotent

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Returns

204 Starred with no body.

PUT/api/v1/templates/{id}/favourite

curl

curl -X PUT https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/favourite \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.favouriteTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.favourite_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
)
Response204

No body.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Unfavourite template

DELETE/api/v1/templates/{id}/favourite

Unstar a template for the caller; idempotent

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Returns

204 Unstarred with no body.

DELETE/api/v1/templates/{id}/favourite

curl

curl -X DELETE https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/favourite \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.unfavouriteTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.unfavourite_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
)
Response204

No body.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Duplicate template

POST/api/v1/templates/{id}/duplicate

A copy owned by the caller, with new ids, sharing the stored PDFs

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

Request body

Content type application/json

  • namestring

    Default Copy of <name>

    at most 255 characters

Returns

201 Created with a Template object.

POST/api/v1/templates/{id}/duplicate

curl

curl -X POST https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/duplicate \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Example Signer"
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.duplicateTemplate({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  idempotencyKey: "order-1042",
  body: {
    "name": "Example Signer"
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.duplicate_template(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    idempotency_key="order-1042",
    body={
        "name": "Example Signer",
    },
)
Response201
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Add template document

POST/api/v1/templates/{id}/documents

Add a document {name, content_base64}, a PDF or a Word document (converted), admitted and normalized as an upload

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

Request body

Content type application/json · required

  • namestringRequired

    at most 255 characters

  • content_base64stringRequired

    At most 50 MiB decoded

Returns

201 The template with a Template object.

POST/api/v1/templates/{id}/documents

curl

curl -X POST https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/documents \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{
  "name": "contract.pdf",
  "content_base64": "JVBERi0xLjcKJcfsj6IK"
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.addTemplateDocument({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  idempotencyKey: "order-1042",
  body: {
    "name": "contract.pdf",
    "content_base64": "JVBERi0xLjcKJcfsj6IK"
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.add_template_document(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    idempotency_key="order-1042",
    body={
        "name": "contract.pdf",
        "content_base64": "JVBERi0xLjcKJcfsj6IK",
    },
)
Response201
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Delete template document

DELETE/api/v1/templates/{id}/documents/{doc}

Remove a document and the fields on it

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • docstringRequired

    Template document id

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Returns

204 Done with no body.

DELETE/api/v1/templates/{id}/documents/{doc}

curl

curl -X DELETE https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/documents/019343cc-23fa-752b-887b-4cc1d02b5b11 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.deleteTemplateDocument({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  doc: "019343cc-23fa-752b-887b-4cc1d02b5b11",
  ifMatch: '"v3"',
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.delete_template_document(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    doc="019343cc-23fa-752b-887b-4cc1d02b5b11",
    if_match="\"v3\"",
)
Response204

No body.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Get template document content

GET/api/v1/templates/{id}/documents/{doc}/content

The template document's normalized PDF

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • docstringRequired

    Template document id

Returns

200 PDF with application/pdf.

GET/api/v1/templates/{id}/documents/{doc}/content

curl

curl https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/documents/019343cc-23fa-752b-887b-4cc1d02b5b11/content \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -o download.pdf

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.getTemplateDocumentContent({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  doc: "019343cc-23fa-752b-887b-4cc1d02b5b11",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.get_template_document_content(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    doc="019343cc-23fa-752b-887b-4cc1d02b5b11",
)
Response200

The file itself (application/pdf), not JSON.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Get template analysis

GET/api/v1/templates/{id}/documents/{doc}/analysis

The template document's newest analysis

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • docstringRequired

    Template document id

Returns

200 with a Analysis object.

GET/api/v1/templates/{id}/documents/{doc}/analysis

curl

curl https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/documents/019343cc-23fa-752b-887b-4cc1d02b5b11/analysis \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.getTemplateAnalysis({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  doc: "019343cc-23fa-752b-887b-4cc1d02b5b11",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.get_template_analysis(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    doc="019343cc-23fa-752b-887b-4cc1d02b5b11",
)
Response200
{
  "id": "0193f44e-85c4-7b8e-8a2a-ddc796f8beab",
  "document_id": "019343cc-23fa-752b-887b-4cc1d02b5b11",
  "status": "queued",
  "uses": [
    "ocr"
  ],
  "ocr_pages": [
    1
  ],
  "truncated": false,
  "bundle_id": "01931e6e-d65d-777d-8636-4eeaed5a745b",
  "code": "123456",
  "created_at": "2026-11-20T09:30:00Z",
  "finished_at": "2026-11-20T09:30:00Z"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Request template analysis

POST/api/v1/templates/{id}/documents/{doc}/analysis

Ask for a template document's page hashes, for matching uploads

403 CS-ML-0011 unless template matching is in effect.

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • docstringRequired

    Template document id

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

Returns

202 Accepted with a Analysis object.

POST/api/v1/templates/{id}/documents/{doc}/analysis

curl

curl -X POST https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/documents/019343cc-23fa-752b-887b-4cc1d02b5b11/analysis \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.requestTemplateAnalysis({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  doc: "019343cc-23fa-752b-887b-4cc1d02b5b11",
  idempotencyKey: "order-1042",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.request_template_analysis(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    doc="019343cc-23fa-752b-887b-4cc1d02b5b11",
    idempotency_key="order-1042",
)
Response202
{
  "id": "0193f44e-85c4-7b8e-8a2a-ddc796f8beab",
  "document_id": "019343cc-23fa-752b-887b-4cc1d02b5b11",
  "status": "queued",
  "uses": [
    "ocr"
  ],
  "ocr_pages": [
    1
  ],
  "truncated": false,
  "bundle_id": "01931e6e-d65d-777d-8636-4eeaed5a745b",
  "code": "123456",
  "created_at": "2026-11-20T09:30:00Z",
  "finished_at": "2026-11-20T09:30:00Z"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Add template role

POST/api/v1/templates/{id}/roles

Add a role

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

Request body

Content type application/json · required

  • namestringRequired

    at most 255 characters

  • typestringRequired
  • minimum 1 · maximum 999 · Default 1

Returns

201 The template with a Template object.

POST/api/v1/templates/{id}/roles

curl

curl -X POST https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/roles \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Mutual NDA",
  "type": "signature",
  "routing_order": 1
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.addTemplateRole({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  idempotencyKey: "order-1042",
  body: {
    "name": "Mutual NDA",
    "type": "signature",
    "routing_order": 1
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.add_template_role(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    idempotency_key="order-1042",
    body={
        "name": "Mutual NDA",
        "type": "signature",
        "routing_order": 1,
    },
)
Response201
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Update template role

PATCH/api/v1/templates/{id}/roles/{role}

Rename a role or change its type or routing order

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • rolestringRequired

    Role id

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Request body

Content type application/json · required

Returns

200 The template with a Template object.

PATCH/api/v1/templates/{id}/roles/{role}

curl

curl -X PATCH https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/roles/01934b16-8d88-7dc8-872a-7753c2bc35b3 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"' \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Mutual NDA",
  "type": "signature",
  "routing_order": 1
}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.patchTemplateRole({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  role: "01934b16-8d88-7dc8-872a-7753c2bc35b3",
  ifMatch: '"v3"',
  body: {
    "name": "Mutual NDA",
    "type": "signature",
    "routing_order": 1
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.patch_template_role(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    role="01934b16-8d88-7dc8-872a-7753c2bc35b3",
    if_match="\"v3\"",
    body={
        "name": "Mutual NDA",
        "type": "signature",
        "routing_order": 1,
    },
)
Response200
{
  "id": "01935cde-0f12-798f-841f-7d1c8b907a36",
  "name": "Mutual NDA",
  "version": 3,
  "email_subject": "example",
  "email_message": "example",
  "roles": [
    {}
  ],
  "documents": [
    {}
  ],
  "fields": [
    {}
  ],
  "access": "owner",
  "favourite": false,
  "shared": false,
  "folder_id": "0193034a-0062-7488-8256-f14c8b14d025"
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Delete template role

DELETE/api/v1/templates/{id}/roles/{role}

Remove a role and its fields

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • rolestringRequired

    Role id

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Returns

204 Done with no body.

DELETE/api/v1/templates/{id}/roles/{role}

curl

curl -X DELETE https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/roles/01934b16-8d88-7dc8-872a-7753c2bc35b3 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.deleteTemplateRole({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  role: "01934b16-8d88-7dc8-872a-7753c2bc35b3",
  ifMatch: '"v3"',
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.delete_template_role(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    role="01934b16-8d88-7dc8-872a-7753c2bc35b3",
    if_match="\"v3\"",
)
Response204

No body.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

List template fields

GET/api/v1/templates/{id}/fields

A template's fields

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.read · OAuth scope templates:read

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Returns

200 with a TemplateFieldList object.

GET/api/v1/templates/{id}/fields

curl

curl https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/fields \
  -H "Authorization: Bearer $OPENSEAL_API_KEY"

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.listTemplateFields({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.list_template_fields(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
)
Response200
{
  "items": [
    {}
  ]
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.read
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Add template fields

POST/api/v1/templates/{id}/fields

Add one field, or {items: [...]}, bound to roles

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

Headers

  • Up to 255 printable ASCII characters; a replay within 24 hours returns the first response.

    at most 255 characters

Request body

Content type application/json · required

object

Returns

201 Created with a TemplateFieldList object.

POST/api/v1/templates/{id}/fields

curl

curl -X POST https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/fields \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.addTemplateFields({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  idempotencyKey: "order-1042",
  body: {},
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.add_template_fields(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    idempotency_key="order-1042",
    body={},
)
Response201
{
  "items": [
    {}
  ]
}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
409CS-API-0004The idempotency key was used with a different body (CS-API-0011 while the first is still running)
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Update template field

PATCH/api/v1/templates/{id}/fields/{f}

Change a field: the members given replace its own, null removes one; checked whole again

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • fstringRequired

    Field id

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Request body

Content type application/json · required

object

Returns

200 with a TemplateField object.

PATCH/api/v1/templates/{id}/fields/{f}

curl

curl -X PATCH https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/fields/0193c0d2-856b-774d-80df-05b9d4456b17 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"' \
  -H "Content-Type: application/json" \
  -d '{}'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.patchTemplateField({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  f: "0193c0d2-856b-774d-80df-05b9d4456b17",
  ifMatch: '"v3"',
  body: {},
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.patch_template_field(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    f="0193c0d2-856b-774d-80df-05b9d4456b17",
    if_match="\"v3\"",
    body={},
)
Response200
{}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.

Delete template field

DELETE/api/v1/templates/{id}/fields/{f}

Remove a field

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session

Permissiontemplates.write · OAuth scope templates:write

Path parameters

  • idstringRequired

    Object id (UUIDv7)

  • fstringRequired

    Field id

Headers

  • If-MatchstringRequired

    The envelope's ETag as read ("v<version>"); a stale one is 412 CS-WF-0002, none is 428 CS-API-0008.

Returns

204 Done with no body.

DELETE/api/v1/templates/{id}/fields/{f}

curl

curl -X DELETE https://sign.example.com/api/v1/templates/01935cde-0f12-798f-841f-7d1c8b907a36/fields/0193c0d2-856b-774d-80df-05b9d4456b17 \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H 'If-Match: "v3"'

TypeScript

import { OpenSeal } from "@openseal/sdk";

const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.deleteTemplateField({
  id: "01935cde-0f12-798f-841f-7d1c8b907a36",
  f: "0193c0d2-856b-774d-80df-05b9d4456b17",
  ifMatch: '"v3"',
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.delete_template_field(
    id="01935cde-0f12-798f-841f-7d1c8b907a36",
    f="0193c0d2-856b-774d-80df-05b9d4456b17",
    if_match="\"v3\"",
)
Response204

No body.

Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks templates.write
404CS-API-0002No such object, or one of another account (answered alike)
412CS-WF-0002The If-Match version is stale: read the object again
428CS-API-0008If-Match is required and absent
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.