Activities

Creating an activity log

To create a new workspace you can use the /activities endpoint.

Only 3 fields are required:

  • module: The name of the module in which the activity is performed (see the table below for a list of modules).
  • action: The action performed.
  • status: The status of the action.

Note: There is no limit to the number of activities that can be created.

High-level request elements

action

String

Specifies the action performed during this activity. The following actions can be performed:

  • Create
  • Update
  • Move
  • Copy
  • Draft
  • Send
  • Modified
  • Delete
  • Contact Import File
  • Login
  • Approve
  • Reject
  • Dispatch
  • Register
  • Accept
  • Closed
  • Map
  • Un-map

module

String

Specifies the module that this activity belongs to. The following actions can be performed:

  • System
  • Message
  • Scheduled Message
  • User
  • Contact
  • DistributionList
  • Template
  • Workspace
  • Event
  • WebService
  • Settings
  • Conversation
  • Gateway
  • Workspace Mapping
  • Folders
  • Team
  • RSS
  • API Mapping
  • Asset
  • Instruction

workspace

String

The workspace in which this activity is performed. This will usually be the API user’s default workspace

user

String

The username of the person who performed this activity. This will usually be the API user invoking the creation.

status

String

Specifies the status of the activity. The status can be one of the following:

  • Successful
  • Failed
  • Rejected

description

String

The description of the activity. This is free text that provides details about the activity.

Notes:

  • If the description is not provided during the creation of the activity, this field will not exist for the specific activity.
  • As updating an activity is not allowed, take care to ensure that the absence of this field is justified as per your auditing/compliance needs.

time

String

The date and time of the activity in the format: dd/mm/yy hh:mm. This defaults to the time at which the activity is created.


  • JSON
  • XML

{{codeStart}}

HTTP 1.1 POST https://api.<region>.whispir.com/activities?apikey=[your_api_key]

Authorization: Basic asdf98nf89asdvasd2r398h8sdf

x-api-key: your_api_key

Content-Type: application/vnd.whispir.activity-v1+json

{

"module": "Message",

"action" : "Send",

"status" : "Successful",

"description" : "Message sent via the Whispir's Java library"

}

 

> Response will be `201 Created`

{{codeEnd}}