TapRaise
  • Home
  • API Overview
    • Authentication
    • Pagination
    • Response composition
    • Marking as processed
  • API REFERENCE
    • Pledges
    • Persons
    • Calls
    • Transactions
    • Users
    • Shifts
    • Entity access
  • Get support
Powered by GitBook
On this page

Was this helpful?

  1. API REFERENCE

Calls

Last updated 10 months ago

Was this helpful?

  • GET/api/v1/calls
  • POSTCreate a call
  • PUTAdd a call attempt
  • PUTMark a call as completed
  • PUTCancel a call
  • PUTExpires a call at a given date
get

The calls you are able to fetch might be filtered by your service account's permissions, and the organization you represent.

The collection you are paginating is sorted by creation datetime, descending. This means that the first page contains the most recently created calls.

Authorizations
Query parameters
beforestringOptional

Call cursor to fetch results before

Example: a3c2a57e-2797-4159-8700-8ad55bf8150e
lastnumberOptional

The amount of results to fetch before the 'before' cursor

Example: 10
afterstringOptional

Call cursor to fetch results after

Example: a3c2a57e-2797-4159-8700-8ad55bf8150e
firstnumberOptional

The amount of results to fetch after the 'after' cursor

Example: 10
Responses
200Success
application/json
400
Bad request. Response body shows what the problem is.
401
Service account not properly authenticated
403
Service account forbids executing this action
default
application/json
get
GET /api/v1/calls HTTP/1.1
Host: 
Authorization: Bearer jwt
Accept: */*
{
  "edges": [
    {
      "node": {
        "uuid": "5cf67f69-34d0-46fe-b904-20d56248a844",
        "status": "requested",
        "requestedAt": "2025-05-17T12:36:18.174Z",
        "externalMetadata": {
          "applicationName": "basicall",
          "referenceId": "ref_1234567890",
          "agentReferenceId": "agent_1234567890",
          "statusCode": "completed",
          "statusDescription": "The call was completed successfully",
          "additionalProperties": {
            "foo": "bar"
          }
        },
        "attempts": [
          {
            "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
            "attemptAt": "2025-05-17T12:36:18.174Z",
            "createdAt": "2025-05-17T12:36:18.174Z"
          }
        ],
        "attemptsCount": 1,
        "result": {
          "resultCode": "confirmed",
          "completedAt": "2025-05-17T12:36:18.174Z",
          "notes": "text",
          "duration": 120.23,
          "donorRetentionRating": 7
        },
        "lastUpdatedAt": "2025-05-17T12:36:18.174Z",
        "cancelledAt": "2025-05-17T12:36:18.174Z",
        "completedAt": "2025-05-17T12:36:18.174Z",
        "expiredAt": "2025-05-17T12:36:18.174Z",
        "notes": "text",
        "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
        "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
        "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
        "type": "happy_call"
      },
      "cursor": "48094b0e-15b3-430f-ab5a-16ecf12b9171"
    }
  ],
  "pageInfo": {
    "startCursor": "48094b0e-15b3-430f-ab5a-16ecf12b9171",
    "endCursor": "494d74df-6fbc-46a3-811e-1c17230340a1",
    "hasPreviousPage": true,
    "hasNextPage": false
  }
}

Create a call

post

This endpoint creates a call for a person (and pledge case), if your service account allows you to.

The person you are allowed to create a call for is also limited by your service account.

We advice you to provide your own 'uuid' value, as you can use this as a mechanism to ensure the call is only created once. If the call is accidentally posted twice, the uuid will ensure it is only saved the first time, and a 409 CONFLICT status will be returned when posted a second time with the same uuid. When you don't supply a uuid, the system will generate one for you, which will be returned in the response body.

This endpoint will return the created call in the response body.

Determining where the call will be managed

When creating a call through the API, you need to determine where the call will be managed. You can do this by supplying or not supplying an externalMetadata-property in the request body. Based upon the value of this property, different input validation and domain rules apply.

When you don't supply external metadata, we consider the call to be primarily managed in TapRaise.app, and it needs to adhere to TapRaise's domain rules that are there to ensure it's validity and quality.

When you supply external metadata, we consider the call to be primarily managed at that source, and do NOT apply the domain rules we apply on calls managed in TapRaise. We consider it as external data that cannot be updated in TapRaise.app.

Be sure to check the descriptions for fields in the request body to see which fields are required, optional or forbidden for each scenario.

Authorizations
Body
uuidstring · uuidOptional

UUID (v4). The call's globally unique identifier in the system. If not provided, a new UUID will be generated.

Example: 82b431f0-f401-4afd-b6db-9d1d751232d9
statusstring · enumOptional

The current status of the call:

  • requested → a call is requested and should be made. Initial status.
  • completed → a call is done and completed. End status.
  • cancelled → a call was requested but is cancelled and thus never called. End status.
  • expired → a call was expired since the person was not reached within a specified number of attempts. End status.

Status is not allowed to be set when creating a call that is managed in TapRaise. It will by default get assigned status requested after creation. Externally sourced calls are allowed to be created with any status from the whitelist.

Example: requestedPossible values:
requestedAtstring · date-timeRequired

ISO8601 compatible datetime string

externalMetadataall ofOptional

When provided the call is considered to be managed in this external system, and the call is not editable in TapRaise and does not need to adhere to the TapRaise domain rules. See the general description of this endpoint for more information.

Default: null
resultall ofOptional

The result of a completed call. As we don't allow a call to be created completed, when to be managed in TapRaise.app, this field is not allowed to be set in that case.

requestedByUserUuidstring · uuidOptional

UUID (v4) of the user that requested this call.

Example: f5e2ba11-1786-4ba9-bd5a-0d99317f4706
cancelledAtstringOptional

Date when call got cancelled, formatted as ISO8601 date string.

Example: 2023-05-01T00:00:00.000Z
completedAtstringOptional

Date when call got completed, formatted as ISO8601 date string.

Example: 2023-05-01T00:00:00.000Z
notesstringOptional

The notes of the call

personUuidstring · uuidRequired

UUID (v4) of the person that is being called.

Example: f5e2ba11-1786-4ba9-bd5a-0d99317f4706
relatedCaseUuidstring · uuidOptional

UUID (v4) of any of the person's pledge cases that is related to this call.

Example: f5e2ba11-1786-4ba9-bd5a-0d99317f4706
callingOrganizationUuidstring · uuidOptional

UUID (v4) of the organization that will perform this call.

Example: f5e2ba11-1786-4ba9-bd5a-0d99317f4706
typestring · enumRequired

The type of call:

  • verification → used for verifying the personal details when a donor was newly recruited.
  • happy_call → used for existing donors to keep them engaged.
  • winback → used for donors to get them resubscribed.

Call type is not allowed to be set when creating a call that is managed externally. It will by default get assigned type verification after creation.

Example: verificationPossible values:
Responses
201
Call was created
application/json
400
Bad request. Response body shows what the problem is.
401
Service account not properly authenticated
403
Service account forbids executing this action
409
Call already exists
post
POST /api/v1/calls HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 948

{
  "uuid": "82b431f0-f401-4afd-b6db-9d1d751232d9",
  "status": "requested",
  "requestedAt": "2025-05-17T12:36:18.174Z",
  "externalMetadata": {
    "applicationName": "basicall",
    "referenceId": "ref_1234567890",
    "agentReferenceId": "agent_1234567890",
    "statusCode": "completed",
    "statusDescription": "The call was completed successfully",
    "additionalProperties": "{\"foo\": \"bar\"}"
  },
  "attempts": [
    {
      "createdAt": "2025-05-17T12:36:18.174Z",
      "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706"
    }
  ],
  "result": {
    "resultCode": "confirmed",
    "completedAt": "2023-05-01T00:00:00.000Z",
    "notes": "text",
    "duration": 120.23,
    "donorRetentionRating": 7
  },
  "requestedByUserUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "cancelledAt": "2023-05-01T00:00:00.000Z",
  "completedAt": "2023-05-01T00:00:00.000Z",
  "notes": "text",
  "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "type": "verification"
}
{
  "uuid": "5cf67f69-34d0-46fe-b904-20d56248a844",
  "status": "requested",
  "requestedAt": "2025-05-17T12:36:18.174Z",
  "externalMetadata": {
    "applicationName": "basicall",
    "referenceId": "ref_1234567890",
    "agentReferenceId": "agent_1234567890",
    "statusCode": "completed",
    "statusDescription": "The call was completed successfully",
    "additionalProperties": {
      "foo": "bar"
    }
  },
  "attempts": [
    {
      "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
      "attemptAt": "2025-05-17T12:36:18.174Z",
      "createdAt": "2025-05-17T12:36:18.174Z"
    }
  ],
  "attemptsCount": 1,
  "result": {
    "resultCode": "confirmed",
    "completedAt": "2025-05-17T12:36:18.174Z",
    "notes": "text",
    "duration": 120.23,
    "donorRetentionRating": 7
  },
  "lastUpdatedAt": "2025-05-17T12:36:18.174Z",
  "cancelledAt": "2025-05-17T12:36:18.174Z",
  "completedAt": "2025-05-17T12:36:18.174Z",
  "expiredAt": "2025-05-17T12:36:18.174Z",
  "notes": "text",
  "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "type": "happy_call"
}

Add a call attempt

put

This endpoint adds a call attempt to a call, if your service account allows you to. A call attempt is a record of a call being made to a person. It is used to keep track of how many times a person has been called, and when the last call was made. It is also used to determine if a person should be called again, based on the maximum number of call attempts allowed for a person. The maximum number of call attempts is determined by the owning organization of the person. The owning organization is the organization that the person belongs to. The owning organization is determined by the person's owning organization uuid.

Authorizations
Path parameters
uuidstring · uuidRequired

The uuid of the call

Body
userUuidstring · uuidOptional

UUID (v4) of the user that attempted the call.

Example: f5e2ba11-1786-4ba9-bd5a-0d99317f4706
attemptAtstringOptional

Timestamp when a call was attempted, formatted as ISO8601 date string.

Example: 2023-05-01T00:00:00.000Z
Responses
200
Call attempt was added
application/json
400
Bad request. Response body shows what the problem is.
401
Service account not properly authenticated
403
Service account forbids executing this action
404
Call is not found
put
PUT /api/v1/calls/{uuid}/actions/add-attempt HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "attemptAt": "2023-05-01T00:00:00.000Z"
}
{
  "uuid": "5cf67f69-34d0-46fe-b904-20d56248a844",
  "status": "requested",
  "requestedAt": "2025-05-17T12:36:18.174Z",
  "externalMetadata": {
    "applicationName": "basicall",
    "referenceId": "ref_1234567890",
    "agentReferenceId": "agent_1234567890",
    "statusCode": "completed",
    "statusDescription": "The call was completed successfully",
    "additionalProperties": {
      "foo": "bar"
    }
  },
  "attempts": [
    {
      "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
      "attemptAt": "2025-05-17T12:36:18.174Z",
      "createdAt": "2025-05-17T12:36:18.174Z"
    }
  ],
  "attemptsCount": 1,
  "result": {
    "resultCode": "confirmed",
    "completedAt": "2025-05-17T12:36:18.174Z",
    "notes": "text",
    "duration": 120.23,
    "donorRetentionRating": 7
  },
  "lastUpdatedAt": "2025-05-17T12:36:18.174Z",
  "cancelledAt": "2025-05-17T12:36:18.174Z",
  "completedAt": "2025-05-17T12:36:18.174Z",
  "expiredAt": "2025-05-17T12:36:18.174Z",
  "notes": "text",
  "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "type": "happy_call"
}

Mark a call as completed

put

This endpoint marks a call as completed, if your service account allows you to. A call can marked as completed when a call has been made to a person.

Authorizations
Path parameters
uuidstring · uuidRequired

The uuid of the call

Body
userUuidstring · uuidOptional

UUID (v4) of the user that completes the call.

Example: f5e2ba11-1786-4ba9-bd5a-0d99317f4706
resultall ofRequired

The result of a completed call.

Responses
200
Call that was marked as completed
application/json
400
Bad request. Response body shows what the problem is.
401
Service account not properly authenticated
403
Service account forbids executing this action
404
Call is not found
put
PUT /api/v1/calls/{uuid}/actions/complete HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 189

{
  "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "result": {
    "completedAt": "2023-05-01T00:00:00.000Z",
    "notes": "Some notes about the call",
    "donorRetentionRating": 7,
    "resultCode": "confirmed"
  }
}
{
  "uuid": "5cf67f69-34d0-46fe-b904-20d56248a844",
  "status": "requested",
  "requestedAt": "2025-05-17T12:36:18.174Z",
  "externalMetadata": {
    "applicationName": "basicall",
    "referenceId": "ref_1234567890",
    "agentReferenceId": "agent_1234567890",
    "statusCode": "completed",
    "statusDescription": "The call was completed successfully",
    "additionalProperties": {
      "foo": "bar"
    }
  },
  "attempts": [
    {
      "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
      "attemptAt": "2025-05-17T12:36:18.174Z",
      "createdAt": "2025-05-17T12:36:18.174Z"
    }
  ],
  "attemptsCount": 1,
  "result": {
    "resultCode": "confirmed",
    "completedAt": "2025-05-17T12:36:18.174Z",
    "notes": "text",
    "duration": 120.23,
    "donorRetentionRating": 7
  },
  "lastUpdatedAt": "2025-05-17T12:36:18.174Z",
  "cancelledAt": "2025-05-17T12:36:18.174Z",
  "completedAt": "2025-05-17T12:36:18.174Z",
  "expiredAt": "2025-05-17T12:36:18.174Z",
  "notes": "text",
  "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "type": "happy_call"
}

Cancel a call

put

This endpoint cancells a call.

The person who is allowed to cancel a call is limited by your service account.

This endpoint will return the cancelled call in the response body.

Authorizations
Path parameters
uuidstringRequired
Body
cancelledAtstringOptional

Timestamp when a call was cancelled, formatted as ISO8601 date string.

Example: 2023-05-01T00:00:00.000Z
Responses
200
Call was cancelled
application/json
400
Bad request. Response body shows what the problem is.
401
Service account not properly authenticated
403
Service account forbids executing this action
404
Call is not found
409
Call already cancelled
put
PUT /api/v1/calls/{uuid}/actions/cancel HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "cancelledAt": "2023-05-01T00:00:00.000Z"
}
{
  "uuid": "5cf67f69-34d0-46fe-b904-20d56248a844",
  "status": "requested",
  "requestedAt": "2025-05-17T12:36:18.174Z",
  "externalMetadata": {
    "applicationName": "basicall",
    "referenceId": "ref_1234567890",
    "agentReferenceId": "agent_1234567890",
    "statusCode": "completed",
    "statusDescription": "The call was completed successfully",
    "additionalProperties": {
      "foo": "bar"
    }
  },
  "attempts": [
    {
      "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
      "attemptAt": "2025-05-17T12:36:18.174Z",
      "createdAt": "2025-05-17T12:36:18.174Z"
    }
  ],
  "attemptsCount": 1,
  "result": {
    "resultCode": "confirmed",
    "completedAt": "2025-05-17T12:36:18.174Z",
    "notes": "text",
    "duration": 120.23,
    "donorRetentionRating": 7
  },
  "lastUpdatedAt": "2025-05-17T12:36:18.174Z",
  "cancelledAt": "2025-05-17T12:36:18.174Z",
  "completedAt": "2025-05-17T12:36:18.174Z",
  "expiredAt": "2025-05-17T12:36:18.174Z",
  "notes": "text",
  "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "type": "happy_call"
}

Expires a call at a given date

put

This endpoint marks a call as expired. If no expiry date is provided, the call will be set to have expired on the timestamp this request was processed.

The person who is allowed to add an expiry date is limited by your service account.

Whether your service account is allowed to expire a call, is dependent on your service account's access scope.

Authorizations
Path parameters
uuidstringRequired
Body
expiredAtstringOptional

Expiry date of a call, formatted as ISO8601 date string.

Example: 2023-05-01T00:00:00.000Z
Responses
200
Call expiry date was set
application/json
400
Bad request. Response body shows what the problem is.
401
Service account not properly authenticated
403
Service account forbids executing this action
404
Call is not found
put
PUT /api/v1/calls/{uuid}/actions/expire HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "expiredAt": "2023-05-01T00:00:00.000Z"
}
{
  "uuid": "5cf67f69-34d0-46fe-b904-20d56248a844",
  "status": "requested",
  "requestedAt": "2025-05-17T12:36:18.174Z",
  "externalMetadata": {
    "applicationName": "basicall",
    "referenceId": "ref_1234567890",
    "agentReferenceId": "agent_1234567890",
    "statusCode": "completed",
    "statusDescription": "The call was completed successfully",
    "additionalProperties": {
      "foo": "bar"
    }
  },
  "attempts": [
    {
      "userUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
      "attemptAt": "2025-05-17T12:36:18.174Z",
      "createdAt": "2025-05-17T12:36:18.174Z"
    }
  ],
  "attemptsCount": 1,
  "result": {
    "resultCode": "confirmed",
    "completedAt": "2025-05-17T12:36:18.174Z",
    "notes": "text",
    "duration": 120.23,
    "donorRetentionRating": 7
  },
  "lastUpdatedAt": "2025-05-17T12:36:18.174Z",
  "cancelledAt": "2025-05-17T12:36:18.174Z",
  "completedAt": "2025-05-17T12:36:18.174Z",
  "expiredAt": "2025-05-17T12:36:18.174Z",
  "notes": "text",
  "personUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "relatedCaseUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "callingOrganizationUuid": "f5e2ba11-1786-4ba9-bd5a-0d99317f4706",
  "type": "happy_call"
}