Claim Hooks

Creates a claim hook

post

This route creates a claim hook. Claim hooks are an atomic action that will be performed when a boost is claimed

Authorizations
Body
hookone ofRequired
or
Responses
200
Successful response
application/json
Responsestring
post
POST /api/claim-hook/create HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 390

{
  "hook": {
    "type": "GRANT_PERMISSIONS",
    "data": {
      "claimUri": "text",
      "targetUri": "text",
      "permissions": {
        "role": "text",
        "canEdit": true,
        "canIssue": true,
        "canRevoke": true,
        "canManagePermissions": true,
        "canIssueChildren": "text",
        "canCreateChildren": "text",
        "canEditChildren": "text",
        "canRevokeChildren": "text",
        "canManageChildrenPermissions": "text",
        "canManageChildrenProfiles": false,
        "canViewAnalytics": true
      }
    }
  }
}
text

Gets Claim Hooks

post

This route gets claim hooks attached to a given boost

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
uristringRequired
Responses
200
Successful response
application/json
post
POST /api/claim-hook/get HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 431

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "query": {
    "type": "text",
    "data": {
      "claimUri": "text",
      "targetUri": "text",
      "permissions": {
        "role": "text",
        "canEdit": true,
        "canIssue": true,
        "canRevoke": true,
        "canManagePermissions": true,
        "canIssueChildren": "text",
        "canCreateChildren": "text",
        "canEditChildren": "text",
        "canRevokeChildren": "text",
        "canManageChildrenPermissions": "text",
        "canManageChildrenProfiles": true,
        "canViewAnalytics": true
      }
    }
  },
  "uri": "text"
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "id": "text",
      "createdAt": "text",
      "updatedAt": "text",
      "type": "GRANT_PERMISSIONS",
      "data": {
        "claimUri": "text",
        "targetUri": "text",
        "permissions": {
          "role": "text",
          "canEdit": true,
          "canIssue": true,
          "canRevoke": true,
          "canManagePermissions": true,
          "canIssueChildren": "text",
          "canCreateChildren": "text",
          "canEditChildren": "text",
          "canRevokeChildren": "text",
          "canManageChildrenPermissions": "text",
          "canManageChildrenProfiles": false,
          "canViewAnalytics": true
        }
      }
    }
  ]
}

Delete a Claim Hook

post

This route deletes a claim hook

Authorizations
Body
idstringRequired
Responses
200
Successful response
application/json
Responseboolean
post
POST /api/claim-hook/update HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "id": "text"
}
true

Was this helpful?