Skip to content
Developer docs
⌘ K
Dashboard ↗

HTTP endpoints

deleteProgram

Deletes a program with no referrals, rewards or other history. A program with history is archived instead: paused, stripped of its placement keys and kept. The result says which.

DELETE /api/v1/programs/{id}

Requires programs:write. Keep the Bearer key on your server.

A program with referrals, rewards or other history is archived instead: paused, hidden, stripped of its placement keys and kept. The result says which happened.

SDK

ts
grizzlee.deleteProgram(id: string): Promise<ProgramDeletion>

HTTP

Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.

sh
curl --fail-with-body --request DELETE \
  'https://app.grizzlee.ca/api/v1/programs/{id}' \
  -H "Authorization: Bearer $GRIZZLEE_SERVER_KEY"

Response

HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.

FieldTypeRequiredDetails
idstringYes
resultunionYes

result

Variant 1

Type: string.

Variant 2

Type: string.

Response schema

json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "result": {
      "anyOf": [
        {
          "type": "string",
          "const": "deleted"
        },
        {
          "type": "string",
          "const": "archived"
        }
      ]
    }
  },
  "required": [
    "id",
    "result"
  ]
}

Errors

Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.