Custom API Action

Make a custom, authenticated HTTP call to the Slack API.

This action is unlike other Slack cards; refer to the Slack API documentation.

Caution

You can't use this card to call any of the following APIs:

  • channels.*

  • groups.*

  • im.*

  • mpim.*

  • pins.list

  • channels.history

  • conversations.history

  • conversations.replies

  • conversations.list

  • chat.scheduledMessages.list

Options

Field Definition Type Required
Request Type

One of five supported HTTP request methods (sometimes called verbs) in custom API calls:

  • GET - retrieves data from a web server based on your parameters. GET requests a representation of the specified resource. If successful, GET will receive a 200 OK response message with the requested content. Refer to additional documentation here.
  • POST - sends data to a web server based on your parameters. POST requests include actions like uploading a file. Multiple POSTs may result in a different outcome than a single POST, so you should be cautious about unintentionally sending multiple POSTs. If a POST is successful, you will receive a 200 OK response message. Refer to additional documentation here.
  • PUT - sends data to a location in the web server based on your parameters. PUT requests include actions like uploading a file. The difference between a PUT and POST is that PUT is idempotent, meaning that the result of a single successful PUT is the same as many identical PUT's. If a PUT is successful, you will receive a 200 response message (usually 201 or 204). Refer to additional documentation here.
  • PATCH - applies partial modifications to a resource on a web server based on your parameters. PATCH is not idempotent, meaning that multiple PATCHs could have unintended consequences. If a PUT is successful, you will receive a 200 response message (usually 204). Refer to additional documentation here.
  • DELETE - deletes the specified resource from the web server based on your parameters (if the resource exists). If a DELETE is successful, you will receive a 200 OK response message. Refer to additional documentation here.
Dropdown TRUE

Input

Field Definition Type Required
Relative URL The address on the web server you are attempting to interact with. Relative URL means that you don't have to explicitly specify the protocol at the beginning of the URL (such as "http://"). This suggests to the web server that the interaction is occurring on the server (in this instance). String FALSE
Query JSON object that determines the action taken at the URL Object or String FALSE
Headers JSON object that determines the content type of the request. This will usually be a replica of the example below. Object FALSE
Body Specify a request body in JSON format. Only available for POST, PUT, and PATCH requests. Object FALSE

Output

Field Definition Type
Status Code success or failure of your HTTP request. Here is a list of all status codes. Number
Headers A detailed context for the status code, unrelated to the output body. Response headers are dependent on your selected HTTP request option. Note that not all headers are response headers. Object
Body data returned from your selected HTTP request (for example, the data from a GET request) Object

Related topics

Slack connector

About the elements of Okta Workflows

Slack API