Manual API Usage

Manual API Usage

While the Web Action SDK provides a streamlined interface for interacting with our API, some users may prefer or need to use direct API access. This page outlines how to use the API manually as a fallback option.

Note: Manual API usage should be considered a temporary solution. The API specification may change over time, so it's recommended to transition to the SDK when possible for long-term stability and easier maintenance.

Base URL

All API requests should be made to the following base URL:

https://api.actionbase.co/v1

Authentication

To authenticate your requests, include your API key in the x-api-key header:

x-api-key: YOUR_API_KEY

Endpoint

All integrations are run against a single endpoint:

POST /integrations/run

The specific action and platform are specified in the request body.

Example Requests

Get LinkedIn Message

Retrieves the most recent message from a specific LinkedIn user.

POST /integrations/run

Headers:
x-api-key: YOUR_API_KEY
Content-Type: application/json

Request Body:
{
  "platform": "linkedin",
  "action": "getMessage",
  "params": {
    "from": "John Doe"
  }
}

Example Request:
curl -X POST \
     -H "x-api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"platform": "linkedin", "action": "getMessage", "params": {"from": "John Doe"}}' \
     https://api.actionbase.co/v1/integrations/run

Send LinkedIn Message

Sends a message to a specific LinkedIn user.

POST /integrations/run

Headers:
x-api-key: YOUR_API_KEY
Content-Type: application/json

Request Body:
{
  "platform": "linkedin",
  "action": "sendMessage",
  "params": {
    "to": "John Doe",
    "message": "Hello, this is a test message."
  }
}

Example Request:
curl -X POST \
     -H "x-api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"platform": "linkedin", "action": "sendMessage", "params": {"to": "John Doe", "message": "Hello, this is a test message."}}' \
     https://api.actionbase.co/v1/integrations/run

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests. Common status codes include:

  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 404: Not Found
  • 500: Internal Server Error

Error responses will include a JSON body with more details about the error.

Rate Limiting

To ensure fair usage, the API implements rate limiting. If you exceed the rate limit, you'll receive a 429 (Too Many Requests) status code. The response will include a Retry-After header indicating how long to wait before making another request.

Conclusion

While manual API usage can be a helpful fallback, we strongly recommend using the Web Action SDK for the best experience and to ensure compatibility with future updates. If you're experiencing issues with the SDK, please contact our support team for assistance in resolving those problems.