CreditTransfer v1.2

Transfers email, sms or inbox testing credits between two accounts.

This endpoint applies to partner-auth only. See our guide for more information on partner-auth endpoints and authentication.

What can I do with creditTransfer?

Credit Transfer can be used to create new transactions and retrieve information about existing ones.

  • Issue a POST to create a new transfer.
  • Use sourceaccount_id and destinationaccount_id to get all transactions between two accounts.

GET /creditTransfer or /creditTransfer/:id

AttributeTypeFilterSortDescription
id
intYesYesUnique ID of the resource.
sourceaccount_id
intYesNoAccount from which credits will be deducted.
destinationaccount_id
intYesNoAccount to which credits will be added.
type
enumYesNoType of credits to transfer: one of "email", "sms", "inboxtest".
amount
intNoNoNumber of credits to transfer; must be non-zero. If positive, credits will be transferred from the source account to the destination account. If negative, credits will be transferred from destination to source.
note
string/nullNoNoA user-specified note associated with the transaction.
cdate
decimalNoYesTransaction timestamp.

HEAD /creditTransfer or /creditTransfer/:id

AttributeTypePresenceDescription
id
intOptionalUnique ID of the resource.
sourceaccount_id
intOptionalAccount from which credits will be deducted.
destinationaccount_id
intOptionalAccount to which credits will be added.
type
enumOptionalType of credits to transfer: one of "email", "sms", "inboxtest".

POST /creditTransfer

AttributeTypePresenceDescription
sourceaccount_id
intRequiredAccount from which credits will be deducted.
destinationaccount_id
intRequiredAccount to which credits will be added.
type
enumRequiredType of credits to transfer: one of "email", "sms", "inboxtest".
amount
intRequiredNumber of credits to transfer; must be non-zero. If positive, credits will be transferred from the source account to the destination account. If negative, credits will be transferred from destination to source.
note
string/nullOptionalA user-specified note associated with the transaction.

PUT /creditTransfer or /creditTransfer/:id

This method is not supported.

DELETE /creditTransfer or /creditTransfer/:id

This method is not supported.

Error codes

There are no error codes for this endpoint.

Examples

JSON response

{
    "id"                    : 1234567,
    "sourceaccount_id"      : 123456,
    "destinationaccount_id" : 123456,
    "type"                  : "email"
    "amount"                : 500,
    "note"                  : "Credit purchase",
    "cdate"                 : 1234567890,
}