Integrations

OAuth

The OAuth 2.1 authorization server: the token endpoint (client credentials, authorization code with PKCE, refresh token, JWT bearer grant), consent, and discovery metadata and keys.

Token endpoint

POST/api/v1/oauth/token

OAuth 2.1 token endpoint: client credentials, authorization code with PKCE, refresh token, JWT bearer grant

RFC 6749 §5.2 errors, with the CS-* code as error_description: invalid_client (CS-AUTH-0007), invalid_grant (CS-AUTH-0014: a code or refresh token unknown, spent, expired or not this client's, a wrong PKCE verifier or redirect URI, an assertion with a bad signature, audience or lifetime; CS-AUTH-0005: the member has not consented to the JWT integration), invalid_scope (CS-AUTH-0006), unsupported_grant_type.

AuthNone (public)

Request body

Content type application/json · required

  • grant_typestringRequired

    One of client_credentials, authorization_code, refresh_token, urn:ietf:params:oauth:grant-type:jwt-bearer

  • client_idstring
  • scopestring
  • codestring

    authorization_code

  • authorization_code: the URI the code was issued to

  • authorization_code: the PKCE verifier

    at least 43 characters · at most 128 characters

  • refresh_token: rotated on every use; one spent twice revokes its family

  • assertionstring

    The JWT bearer grant's signed assertion

Returns

200 with a TokenResponse object.

POST/api/v1/oauth/token

curl

curl -X POST https://sign.example.com/api/v1/oauth/token \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -d grant_type=client_credentials \
  -d scope="envelopes:read envelopes:write"

TypeScript

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

const os = new OpenSeal({ baseUrl: "https://sign.example.com" });
const token = await os.token({
  clientId: process.env.CLIENT_ID,
  clientSecret: process.env.CLIENT_SECRET,
  grant_type: "client_credentials",
  scope: "envelopes:read envelopes:write",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com")
token = client.token(
    client_id=os.environ["CLIENT_ID"],
    client_secret=os.environ["CLIENT_SECRET"],
    grant_type="client_credentials",
    scope="envelopes:read envelopes:write",
)
Response200
{
  "access_token": "eyJhbGciOiJFUzI1NiJ9.example.signature",
  "token_type": "Bearer",
  "expires_in": 1,
  "scope": "envelopes:read",
  "refresh_token": "osr_example"
}
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
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.

Authorization server metadata

GET/.well-known/oauth-authorization-server

OAuth authorization server metadata (RFC 8414)

AuthNone (public)

Returns

200 with application/json.

GET/.well-known/oauth-authorization-server

curl

curl https://sign.example.com/.well-known/oauth-authorization-server

TypeScript

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

const os = new OpenSeal({ baseUrl: "https://sign.example.com" });
const data = await os.oauthMetadata();

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com")
data = client.oauth_metadata()
Response200
{}
Errors this can answer
StatusCodeWhen
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.

Authorization endpoint

GET/api/v1/oauth/authorize

Authorization endpoint: hands the request to the web app's consent screen

303 to /app.html#/authorize?<the same query>; the screen signs the member in if needed, reads the checked request and posts the answer. Nothing is checked or recorded here.

AuthNone (public)

Returns

303 To the consent screen with no body.

GET/api/v1/oauth/authorize

curl

curl https://sign.example.com/api/v1/oauth/authorize

TypeScript

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

const os = new OpenSeal({ baseUrl: "https://sign.example.com" });
const data = await os.authorizeRedirect();

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com")
data = client.authorize_redirect()
Response303

No JSON body.

Errors this can answer
StatusCodeWhen
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.

Answer a consent request

POST/api/v1/oauth/authorize

The member's answer to an authorization request

A staff session only (422 at /credential otherwise). allow records the member's consent (widening a live one) and answers the redirect with a one-time code (ten minutes), state and iss; deny answers it with error=access_denied. Refusals are problems at the request's member (/client_id, /redirect_uri, /response_type, /code_challenge, /scope, /state, /decision), never a redirect to an unregistered URI.

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session; any signed-in caller

Request body

Content type application/json · required

Returns

200 with application/json.

POST/api/v1/oauth/authorize

curl

curl -X POST https://sign.example.com/api/v1/oauth/authorize \
  -H "Authorization: Bearer $OPENSEAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "response_type": "code",
  "client_id": "0193948f-e603-7f61-8dc0-36b5c596dc09",
  "redirect_uri": "https://app.example.com/openseal/callback",
  "scope": "envelopes:read",
  "state": "af0ifjsldkj",
  "code_challenge": "examplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "code_challenge_method": "S256",
  "decision": "allow"
}'

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.authorize({
  body: {
    "response_type": "code",
    "client_id": "0193948f-e603-7f61-8dc0-36b5c596dc09",
    "redirect_uri": "https://app.example.com/openseal/callback",
    "scope": "envelopes:read",
    "state": "af0ifjsldkj",
    "code_challenge": "examplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "code_challenge_method": "S256",
    "decision": "allow"
  },
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.authorize(
    body={
        "response_type": "code",
        "client_id": "0193948f-e603-7f61-8dc0-36b5c596dc09",
        "redirect_uri": "https://app.example.com/openseal/callback",
        "scope": "envelopes:read",
        "state": "af0ifjsldkj",
        "code_challenge": "examplexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "code_challenge_method": "S256",
        "decision": "allow",
    },
)
Response200
{
  "redirect_to": "https://app.example.com/openseal/callback"
}
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)
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.

Check an authorization request

GET/api/v1/oauth/authorize/request

An authorization request, checked, for the consent screen to show

The query of GET /oauth/authorize, checked against the client and the signed-in member as POST /oauth/authorize checks it; answers the client's name and the scopes asked.

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session; any signed-in caller

Query parameters

Returns

200 with application/json.

GET/api/v1/oauth/authorize/request

curl

curl https://sign.example.com/api/v1/oauth/authorize/request?response_type=example&client_id=0193948f-e603-7f61-8dc0-36b5c596dc09&redirect_uri=https://app.example.com/openseal/callback&scope=envelopes:read&code_challenge=example&code_challenge_method=example \
  -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.authorizeRequest({
  response_type: "example",
  client_id: "0193948f-e603-7f61-8dc0-36b5c596dc09",
  redirect_uri: "https://app.example.com/openseal/callback",
  scope: "envelopes:read",
  code_challenge: "example",
  code_challenge_method: "example",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.authorize_request(
    response_type="example",
    client_id="0193948f-e603-7f61-8dc0-36b5c596dc09",
    redirect_uri="https://app.example.com/openseal/callback",
    scope="envelopes:read",
    code_challenge="example",
    code_challenge_method="example",
)
Response200
{
  "client": {
    "id": "01932958-d416-7d08-8aa5-a472d7b50903",
    "name": "Example Signer",
    "kind": "template"
  },
  "scopes": [
    "envelopes:read"
  ],
  "redirect_uri": "https://app.example.com/openseal/callback"
}
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)
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 consents

GET/api/v1/oauth/consents

The apps the caller let act as them

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session; any signed-in caller

Returns

200 with application/json.

GET/api/v1/oauth/consents

curl

curl https://sign.example.com/api/v1/oauth/consents \
  -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.listConsents();

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.list_consents()
Response200
{
  "items": [
    {
      "id": "01931242-3e04-782f-83e8-1cb1d2323066",
      "client": {
        "id": "01931242-3e04-782f-83e8-1cb1d2323066",
        "name": "Example Signer"
      },
      "scopes": [
        "envelopes:read"
      ],
      "granted_at": "2026-11-20T09:30:00Z"
    }
  ]
}
Errors this can answer
StatusCodeWhen
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
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.

Revoke consent

DELETE/api/v1/oauth/consents/{id}

Withdraw a consent: its refresh tokens stop at once, its access tokens on their next request

AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session; any signed-in caller

Path parameters

  • idstringRequired

Returns

204 Withdrawn with no body.

DELETE/api/v1/oauth/consents/{id}

curl

curl -X DELETE https://sign.example.com/api/v1/oauth/consents/01931242-3e04-782f-83e8-1cb1d2323066 \
  -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.revokeConsent({
  id: "01931242-3e04-782f-83e8-1cb1d2323066",
});

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.revoke_consent(
    id="01931242-3e04-782f-83e8-1cb1d2323066",
)
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)
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.

JSON Web Key Set

GET/.well-known/jwks.json

Keys that verify access tokens

AuthNone (public)

Returns

200 with a Jwks object.

GET/.well-known/jwks.json

curl

curl https://sign.example.com/.well-known/jwks.json

TypeScript

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

const os = new OpenSeal({ baseUrl: "https://sign.example.com" });
const data = await os.jwks();

Python

import os
from openseal import OpenSeal

client = OpenSeal("https://sign.example.com")
data = client.jwks()
Response200
{
  "keys": [
    {}
  ]
}
Errors this can answer
StatusCodeWhen
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.