URL configuration and HTTP methods

Correct configuration of the URL and HTTP method is fundamental for your Action's success. These elements determine where and how the request is sent to the external service.

URL Configuration

URL Format

The URL must be complete and publicly accessible:

  • Protocol: Always HTTPS for security (https://)
  • Domain: The domain of the service you want to call
  • Path: The specific path of the API endpoint
  • API Version: Often included in the path (e.g., /v1/, /api/v2/)

Examples of valid URLs:

  • https://api.example.com/v1/tickets
  • https://mysite.com/api/contacts
  • https://webhook.zapier.com/hooks/catch/12345/abcdef
  • https://api.mailgun.com/v3/sandbox.mailgun.org/messages
URLs with dynamic parameters

Some endpoints require parameters in the URL itself. Evolbot supports placeholders that are automatically replaced:

  • Format: {parameter_name}
  • Example: https://api.example.com/users/{user_id}/orders
  • Replacement: {user_id} will be replaced with the user_id parameter value

Available HTTP methods

GET - Retrieve information

When to use it:

  • Check order status
  • Verify product availability
  • Get information from databases
  • Retrieve list of available appointments

Characteristics:

  • Doesn't modify data on the server
  • Parameters are sent in the URL (query string)
  • Idempotent (can be repeated without side effects)
  • Response often cacheable

Example GET configuration:

URL: https://api.shop.com/products/{product_id}/availability

Method: GET

URL Parameters: product_id

POST - Create new resources

When to use it:

  • Create new support tickets
  • Send emails or messages
  • Register new users
  • Save contact forms

Characteristics:

  • Creates new resources on the server
  • Parameters sent in the request body
  • Not idempotent (repeating may create duplicates)
  • Body format often JSON

Example POST configuration:

URL: https://api.support.com/tickets

Method: POST

Content-Type: application/json

Body parameters: email, subject, description, priority

PUT - Update resources

When to use it:

  • Update user profile
  • Change order status
  • Change account settings
  • Update product information

Characteristics:

  • Modifies existing resources
  • Idempotent (same result if repeated)
  • Completely replaces the resource
  • Often requires resource ID in the URL
DELETE - Delete resources

When to use it:

  • Cancel reservations
  • Remove products from cart
  • Delete user accounts
  • Cancel subscriptions

Warning: Use DELETE with caution, irreversible operations!

Important HTTP headers

Content-Type

Specifies the format of data being sent:

  • application/json: Data in JSON format (most common)
  • application/x-www-form-urlencoded: Data as HTML form
  • multipart/form-data: For file uploads
  • text/xml: Data in XML format
Accept

Specifies the desired response format:

  • application/json: Response in JSON
  • text/plain: Response in plain text
  • application/xml: Response in XML
User-Agent

Identifies the client making the request:

  • Example: Evolbot/1.0 (ChatBot Assistant)
  • Utility: Some services require a specific User-Agent

Complete practical examples

Slack integration

Objective: Send messages to a Slack channel

URL: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Method: POST

Headers: Content-Type: application/json

Body parameters: text (required), channel (optional), username (optional)

Mailchimp integration

Objective: Add contact to newsletter

URL: https://us1.api.mailchimp.com/3.0/lists/{list_id}/members

Method: POST

Headers: Content-Type: application/json, Authorization: Basic apikey

URL parameters: list_id

Body parameters: email_address, status, merge_fields

Google Calendar integration

Objective: Create calendar event

URL: https://www.googleapis.com/calendar/v3/calendars/{calendar_id}/events

Method: POST

Headers: Content-Type: application/json, Authorization: Bearer {access_token}

Parameters: summary, start, end, description

Testing and debugging

Useful tools for testing
  • Postman: To test APIs before configuring them in Evolbot
  • curl: Terminal command for quick tests
  • Browser DevTools: To analyze HTTP requests
  • Webhook.site: To test webhooks and see what gets sent
Checks to perform
  • URL reachable: The endpoint responds to a test request
  • Correct method: The service accepts the configured HTTP method
  • Necessary headers: All required headers are configured
  • Parameter format: Data is sent in the expected format
  • Authentication: Credentials are correct and valid

Common error handling

  • 404 Not Found: Wrong URL or non-existent endpoint
  • 405 Method Not Allowed: HTTP method not supported by endpoint
  • 401 Unauthorized: Authentication problems
  • 400 Bad Request: Missing parameters or wrong data format
  • 429 Too Many Requests: Too many calls, respect rate limits
  • 500 Internal Server Error: Server-side error of external service