Zapier API

Zapier API

This API is used for Zapier integration and provides access to read and create leads and associate them with campaigns and user profiles.

API Documentation

For developers building custom integrations or advanced Zapier workflows, you can interact directly with the RevvedUp API using your Zapier token.

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

Generate tokens from Settings → Integrations → Zapier in your RevvedUp dashboard.

Base URL

Production: https://app.revvedup.ai/api/zapier

Endpoints

GET /campaigns

Returns a list of all campaigns accessible to the authenticated user.

Parameters: None

Response 200:

[
  {
    "id": 123,
    "name": "Q1 2025 Lead Generation"
  },
  {
    "id": 456,
    "name": "Enterprise Outreach Campaign"
  }
]

Example:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://app.revvedup.ai/api/zapier/campaigns

GET /campaigns/{campaign_id}

Returns detailed information about a specific campaign, including custom fields available for lead creation.

Parameters:

  • campaign_id (integer, required) - ID of the campaign to retrieve

Response 200:

{
  "id": 123,
  "name": "Q1 2025 Lead Generation",
  "custom_fields": [
    {
      "key": "custom_variable_town",
      "label": "Town"
    },
    {
      "key": "resource_1", 
      "label": "Resource 1: White Paper"
    },
    {
      "key": "resource_2",
      "label": "Resource 2: Case Study"
    }
  ]
}

Example:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://app.revvedup.ai/api/zapier/campaigns/123

GET /users

Returns a list of all users accessible to the authenticated user. For regular accounts, this returns users from the same account. For system administrators, this returns users from all accounts.

Parameters: None

Response 200:

[
  {
    "id": 789,
    "name": "John Smith"
  },
  {
    "id": 790,
    "name": "Sarah Johnson"
  }
]

Example:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://app.revvedup.ai/api/zapier/users

GET /me

Returns information about the currently authenticated user.

Parameters: None

Response 200:

{
  "id": 789,
  "name": "John Smith",
  "avatar_url": "https://example.com/avatar.jpg",
  "sgid": "eyJfcmFpbHMiOi....",
  "content": "<div>User profile content</div>"
}

Example:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://app.revvedup.ai/api/zapier/me

POST /webhook_subscriptions

Creates a new webhook subscription for receiving real-time notifications about leads and other events.

Request Body:

{
  "url": "https://hooks.zapier.com/hooks/catch/12345/abcdef/",
  "campaign_id": 123,
  "user_id": 789
}

Required Fields:

  • url (string) - The webhook endpoint URL to receive notifications

Optional Fields:

  • campaign_id (integer) - Filter notifications to a specific campaign

  • user_id (integer) - Filter notifications to a specific user

Response 201:

{
  "id": 456,
  "url": "https://hooks.zapier.com/hooks/catch/12345/abcdef/",
  "account_id": 123,
  "params": {
    "campaign_id": 123,
    "user_id": 789
  },
  "created_at": "2025-01-15T12:00:00Z",
  "updated_at": "2025-01-15T12:00:00Z"
}

Example:

curl -X POST \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"url":"https://hooks.zapier.com/hooks/catch/12345/abcdef/"}' \
     https://app.revvedup.ai/api/zapier/webhook_subscriptions

DELETE /webhook_subscriptions/{id}

Deletes a webhook subscription.

Parameters:

  • id (integer, required) - ID of the webhook subscription to delete

Response 204: No content

Example:

curl -X DELETE \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://app.revvedup.ai/api/zapier/webhook_subscriptions/456

GET /campaigns/{campaign_id}/leads

Returns the 10 most recent processed leads for a campaign. This endpoint is primarily used for providing sample data when setting up Zapier integrations.

Parameters:

  • campaign_id (integer, required) - ID of the campaign to retrieve leads from

Response 200:

[
  {
    "id": 456,
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "company_name": "Acme Corp",
    "title": "VP Sales",
    "phone_number": "+1-555-0123",
    "domain": "acme.com",
    "industry": "Technology",
    "external_ref": "ext_123",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:35:00Z"
  }
]

Example:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
     https://app.revvedup.ai/api/zapier/campaigns/123/leads

POST /campaigns/{campaign_id}/leads

Creates a new lead in the specified campaign. If a lead with the same external_ref already exists, it will be updated instead. The lead will be automatically processed if the campaign is set to automated mode.

Parameters:

  • campaign_id (integer, required) - ID of the campaign to add the lead to

Request Body:

{
  "email": "[email protected]",
  "first_name": "Jane",
  "last_name": "Smith",
  "company_name": "New Company Inc",
  "title": "Marketing Director",
  "phone_number": "+1-555-0456",
  "domain": "newcompany.com",
  "industry": "Marketing",
  "external_ref": "ext_456",
  "user_id": "[email protected]"
}

Required Fields: You must provide one of the following:

  • li_url (string) - LinkedIn profile URL

  • email (string) - Lead's email address

  • All three: company_name + domain + a name field (name, first_name, or last_name)

Optional Fields:

  • first_name (string) - Lead's first name

  • last_name (string) - Lead's last name

  • name (string) - Full name of the lead

  • company_name (string) - Name of the lead's company

  • title (string) - Job title or role

  • phone_number (string) - Phone number

  • domain (string) - Company domain

  • industry (string) - Industry sector

  • li_url (string) - LinkedIn profile URL

  • role (string) - Role within the organization

  • external_ref (string) - External identifier for deduplication

  • user_id (string) - User to assign the lead to (ID, external_id, or email)

  • template_inputs_attributes (object) - Custom template inputs

  • used_resources_attributes (object) - Resources to be used

  • last_action_at (datetime) - Timestamp of last action

Response 200:

{
  "id": 789,
  "email": "[email protected]",
  "first_name": "Jane",
  "last_name": "Smith",
  "company_name": "New Company Inc",
  "title": "Marketing Director",
  "phone_number": "+1-555-0456",
  "domain": "newcompany.com",
  "industry": "Marketing",
  "external_ref": "ext_456",
  "created_at": "2025-01-15T11:00:00Z",
  "updated_at": "2025-01-15T11:00:00Z"
}

Examples:

Option 1 - LinkedIn URL only:

curl -X POST \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"li_url":"https://www.linkedin.com/in/johndoe"}' \
     https://app.revvedup.ai/api/zapier/campaigns/123/leads

Option 2 - Email only:

curl -X POST \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"email":"[email protected]"}' \
     https://app.revvedup.ai/api/zapier/campaigns/123/leads

Option 3 - Company + Domain + Name:

curl -X POST \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"company_name":"Acme Corp","domain":"acme.com","name":"John Doe"}' \
     https://app.revvedup.ai/api/zapier/campaigns/123/leads

Error Responses

401 Unauthorized:

{
  "error": "Unauthorized"
}

404 Not Found:

{
  "error": "Not found"
}

422 Validation Error:

{
  "errors": {
    "base": ["Must provide either: LinkedIn URL, Email, or Company Name + Domain + Name"]
  }
}

User Assignment

The user_id parameter can be:

  • User ID (integer)

  • User external_id (string)

  • User email address (string)

If not provided or user not found, defaults to campaign owner.

Webhook Notifications

When you create a webhook subscription, you'll receive POST requests to your webhook URL when a lead completes processing in a campaign workflow.

Lead Processed

Triggered when a lead finishes going through a campaign's workflow (research, page generation, sequence creation, etc.). Only leads created via the API will trigger webhooks.

The webhook payload contains the complete lead data in JSON format:

{
  "id": 789,
  "email": "[email protected]",
  "first_name": "Jane", 
  "last_name": "Smith",
  "company_name": "New Company Inc",
  "title": "Marketing Director",
  "phone_number": "+1-555-0456",
  "domain": "newcompany.com",
  "industry": "Marketing",
  "external_ref": "ext_456",
  "campaign_id": 123,
  "user_id": 456,
  "status": "processed",
  "created_at": "2025-01-15T11:00:00Z",
  "updated_at": "2025-01-15T11:30:00Z",
  "last_action_at": "2025-01-15T11:30:00Z"
}

Filtering: Webhook subscriptions can be filtered by campaign_id and/or user_id when created. Only leads matching these criteria will trigger the webhook.

Last updated