### UserInfo Endpoint Example Call Source: https://developers.flodesk.com/index Example of how to call the UserInfo endpoint using curl, demonstrating the required Authorization header. ```curl curl https://api.flodesk.com/oauth2/userinfo \ -H "Authorization: Bearer " ``` -------------------------------- ### API Key Authentication Example Source: https://developers.flodesk.com/index Demonstrates how to authenticate with the Flodesk API using a private API key via Basic HTTP authentication. The API key is used as the username with an empty password. ```bash curl "api_endpoint_here" \ -H "User-Agent: Your App Name (www.yourapp.com)" \ -H "Authorization: Basic $(echo YOUR_API_KEY: | base64)" ``` -------------------------------- ### Initiate OAuth2 Authorization Source: https://developers.flodesk.com/index Redirect users to this URL to start the OAuth2 authorization flow, requesting specific permissions. Ensure to replace placeholders with your application's details. ```text https://api.flodesk.com/oauth2/authorize?client_id=&redirect_uri=&response_type=code&state= ``` -------------------------------- ### OAuth2 Authentication Example Source: https://developers.flodesk.com/index Illustrates how to authenticate with the Flodesk API using OAuth2 access tokens, typically for partner integrations. This method uses a Bearer token in the Authorization header. ```bash curl "api_endpoint_here" \ -H "User-Agent: Your App Name (www.yourapp.com)" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` -------------------------------- ### Get Segment by ID Source: https://developers.flodesk.com/index Retrieves a specific segment by its unique identifier. Includes segment details such as name, subscriber count, creation date, and color. ```APIDOC GET /segments/{id} Server: https://api.flodesk.com/v1 Description: Retrieves a specific segment by its ID. Parameters: - id (string, required): The unique identifier of the segment. Responses: - 200 (application/json): Schema: { "id": "string", "name": "string", "total_active_subscribers": 0, "created_at": "2019-08-24T14:15:22Z", "color": "string" } - 404: Segment not found. ``` -------------------------------- ### Get Flodesk Subscriber Details Source: https://developers.flodesk.com/index Retrieves detailed information for a specific Flodesk subscriber using their ID or email address. The response includes the subscriber's status, contact details, segment assignments, and timestamps. ```APIDOC GET /subscribers/{id_or_email} Default server: https://api.flodesk.com/v1/subscribers/{id_or_email} Parameters: id_or_email (string, required): The unique identifier or email address of the subscriber. Responses: 200 OK: Content-Type: application/json Schema: id: string (read-only) - A read-only generated unique id used to identify each subscriber record. status: string (Enum: "active", "unsubscribed", "unconfirmed", "bounced", "complained", "cleaned") - The subscriber's status. email: string - The subscriber's email address. source: string (Enum: "manual", "csv", "form_optin", "integration", "checkout") - The source from which the subscriber was added. first_name: string - The subscriber's first name. last_name: string - The subscriber's last name. segments: Array of objects (SegmentMini) - Segments that the subscriber was added to. Cap at `50`. custom_fields: object - An object containing custom field data. optin_ip: string - IP address from which the subscriber confirmed their opt-in. optin_timestamp: string - The date and time the subscribers confirmed their opt-in in ISO 8601 format. created_at: string - The date and time the subscriber was added to your list in ISO 8601 format. 404 Not Found: The specified subscriber could not be found. Example Response (200): { "id": "string", "status": "active", "email": "string", "source": "manual", "first_name": "string", "last_name": "string", "segments": [ { "id": "string", "name": "string"} ], "custom_fields": { "property1": "string", "property2": "string" }, "optin_ip": "string", "optin_timestamp": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ``` -------------------------------- ### UserInfo Endpoint Response Sample Source: https://developers.flodesk.com/index A sample JSON response from the UserInfo endpoint, containing user details like ID, email, and creation timestamp. ```json { "id":"a9c3f01e-6cc4-47c5-8710-e6d3c319888e", "email":"foo@baz.com", "full_name":"Foo Baz", "created_at":"2020-12-24T10:11:42.222Z" } ``` -------------------------------- ### Flodesk Webhooks API Source: https://developers.flodesk.com/index Comprehensive documentation for managing Flodesk webhooks. This includes endpoints for listing, creating, retrieving, updating, and deleting webhooks, along with their request and response schemas, parameters, and authorization details. ```APIDOC GET /webhooks Description: Retrieves a list of all webhooks. Supports pagination. Authorizations: api_key, oauth2 Query Parameters: page (integer , optional): The page number. Defaults to 1. per_page (integer , optional): The number of records to be returned on each page. Defaults to 20. Maximum 100. Responses: 200: Success. Returns pagination metadata and an array of webhook objects. Response Schema (application/json): meta (object - PaginationRes): page (integer) total_pages (integer) per_page (integer) total_items (integer) data (Array of objects - WebhookRes): id (string) post_url (string) events (Array of strings) created_at (string ) 400: Bad Request. POST /webhooks Description: Creates a new webhook. Authorizations: api_key, oauth2 Request Body schema (application/json): name (string, required): The webhook name. post_url (string, required): The URL that the webhook will post to. events (Array of strings, required): An array specifying which events are enabled for webhook notifications. Responses: 201: Success. Returns the created webhook object. Response Schema (application/json): id (string) post_url (string) events (Array of strings) created_at (string ) 400: Bad Request. GET /webhooks/{id} Description: Retrieves a specific webhook by its ID. Authorizations: api_key, oauth2 Path Parameters: id (string, required): The unique identifier of the webhook. Responses: 200: Success. Returns the webhook object. Response Schema (application/json): id (string): A read-only generated unique ID. post_url (string): The URL that the webhook will post to. events (Array of strings): Enabled webhook notification events. created_at (string ): The date and time the webhook was created in ISO 8601 format. 404: Not Found. PUT /webhooks/{id} Description: Updates an existing webhook. Authorizations: api_key, oauth2 Path Parameters: id (string, required): The unique identifier of the webhook to update. Request Body schema (application/json): events (Array of strings, optional): An array specifying which events are enabled. name (string, optional): The webhook name. post_url (string, optional): The URL that the webhook will post to. Responses: 200: Success. Returns the updated webhook object. Response Schema (application/json): id (string) post_url (string) events (Array of strings) created_at (string ) 404: Not Found. DELETE /webhooks/{id} Description: Deletes a webhook by its ID. Authorizations: api_key, oauth2 Path Parameters: id (string, required): The unique identifier of the webhook to delete. Responses: 204: Success. No content returned. 404: Not Found. Base URL: https://api.flodesk.com/v1 ``` -------------------------------- ### Flodesk REST API Endpoints Source: https://developers.flodesk.com/index Comprehensive documentation for Flodesk API endpoints, detailing available methods for managing various resources like subscribers, segments, workflows, custom fields, and webhooks. ```APIDOC Flodesk API (1.0.0) Base URL: https://api.flodesk.com/v1 Content-Type: application/json Authentication: - Private Integrations: API Key (HTTP Basic Auth) - Partner Integrations: OAuth2 (Bearer Token) --- Subscriber --- GET /subscribers Lists all subscribers. Parameters: (No parameters specified for listing all) Returns: Array of subscriber objects. POST /subscribers Creates or updates a subscriber. Request Body: subscriber_object: Object containing subscriber details (e.g., email, first_name, custom_fields). Returns: The created or updated subscriber object. GET /subscribers/{id} Retrieves a specific subscriber by ID. Parameters: id: The unique identifier of the subscriber. Returns: The subscriber object. DELETE /subscribers/{id}/segments Removes a subscriber from segments. Parameters: id: The unique identifier of the subscriber. Request Body: segment_ids: Array of segment IDs to remove the subscriber from. Returns: Success message or status. POST /subscribers/{id}/segments Adds a subscriber to segments. Parameters: id: The unique identifier of the subscriber. Request Body: segment_ids: Array of segment IDs to add the subscriber to. Returns: Success message or status. POST /subscribers/{id}/unsubscribe Unsubscribes a subscriber from all lists. Parameters: id: The unique identifier of the subscriber. Returns: Success message or status. --- Segment --- GET /segments Lists all segments. Returns: Array of segment objects. POST /segments Creates a new segment. Request Body: segment_object: Object containing segment details (e.g., name, color). Returns: The created segment object. GET /segments/colors Lists all available segment colors. Returns: Array of color strings. GET /segments/{id} Retrieves a specific segment by ID. Parameters: id: The unique identifier of the segment. Returns: The segment object. --- Workflow --- GET /workflows Lists all workflows. Returns: Array of workflow objects. POST /workflows/{workflow_id}/subscribers Adds a subscriber to a workflow. Parameters: workflow_id: The ID of the workflow. Request Body: subscriber_id: The ID of the subscriber to add. Returns: Success message or status. DELETE /workflows/{workflow_id}/subscribers Removes a subscriber from a workflow. Parameters: workflow_id: The ID of the workflow. Request Body: subscriber_id: The ID of the subscriber to remove. Returns: Success message or status. --- Custom Field --- GET /custom-fields Lists all custom fields with pagination. Parameters: page: Page number for pagination. limit: Number of items per page. Returns: Paginated array of custom field objects. POST /custom-fields Creates a new custom field. Request Body: custom_field_object: Object containing custom field details (e.g., name, type). Returns: The created custom field object. GET /custom-fields Lists all custom fields (duplicate endpoint, likely intended for a different purpose or a typo). Returns: Array of custom field objects. --- Webhook --- GET /webhooks Lists all webhooks. Returns: Array of webhook objects. POST /webhooks Creates a new webhook. Request Body: webhook_object: Object containing webhook details (e.g., url, event_types). Returns: The created webhook object. DELETE /webhooks/{id} Deletes a webhook by ID. Parameters: id: The unique identifier of the webhook. Returns: Success message or status. GET /webhooks/{id} Retrieves a specific webhook by ID. Parameters: id: The unique identifier of the webhook. Returns: The webhook object. PUT /webhooks/{id} Updates an existing webhook. Parameters: id: The unique identifier of the webhook. Request Body: webhook_object: Object containing updated webhook details. Returns: The updated webhook object. --- Webhook Events --- Eventsubscriber.added_to_segment Triggered when a subscriber is added to a segment. Eventsubscriber.created Triggered when a subscriber is created. Eventsubscriber.unsubscribed Triggered when a subscriber unsubscribes. ``` -------------------------------- ### List Subscribers API Source: https://developers.flodesk.com/index Retrieves a paginated list of subscribers. Supports filtering by status and segment. Requires API key or OAuth2 authorization. ```APIDOC GET https://api.flodesk.com/v1/subscribers Authorizations: *api_key*oauth2* Query Parameters: | | | | --- | --- | | page | integer The page number. Defaults to 1. | | per_page | integer The number of records to be returned on each page. Defaults to 20. Maximum 100. | | status | string Enum: "active" "unsubscribed" "unconfirmed" "bounced" "complained" "cleaned" Optional. The subscriber's status. `active`: The subscriber is currently active to receive marketing emails. `unsubscribed`: The subscriber has opted out of marketing emails. `unconfirmed`: The subscriber is pending for double opt-in confirmation. `bounced`: The subscriber's address is undeliverable due to a hard bounce. `complained`: The subscriber marked an email as spam. `cleaned`: The subscriber was cleaned, learn more [here](https://help.flodesk.com/en/articles/4747969#how_can_i_find_out_which_email_addresses_have_been_cleaned). | | segment_id | string Optional. The segment's id. When included, returns only subscribers who were added to the given segment. | Responses: **200** ListSubscribersRes ##### Response Schema: application/json | | | | --- | --- | | meta | object (PaginationRes) | | data | Array of objects (SubscriberRes) | **400** get/subscribers ``` -------------------------------- ### Flodesk Segment Management API Source: https://developers.flodesk.com/index Provides endpoints for managing segments within Flodesk, including listing all segments, creating new segments, and retrieving specific segment details. ```APIDOC GET /segments Description: Lists all segments available in the Flodesk account. Authorizations: - api_key - oauth2 Query Parameters: - page (integer, optional): The page number for pagination. Defaults to 1. - per_page (integer, optional): The number of records per page. Defaults to 20, maximum 100. Responses: - 200 OK: Returns a list of segments with pagination metadata. Content Type: application/json Response Body Schema: { "meta": { "page": 0, "total_pages": 0, "per_page": 0, "total_items": 0 }, "data": [ { "id": "string", "name": "string", "total_active_subscribers": 0, "created_at": "2019-08-24T14:15:22Z", "color": "string" } ] } - 400 Bad Request: Invalid query parameters. POST /segments Description: Creates a new segment in Flodesk. Authorizations: - api_key - oauth2 Request Body Schema: - color (string, required): The color of the segment using a hex code. - name (string, required): The name of the segment. Responses: - 201 Created: Successfully created the segment. Content Type: application/json Response Body Schema: { "id": "string", "name": "string", "total_active_subscribers": 0, "created_at": "2019-08-24T14:15:22Z", "color": "string" } - 400 Bad Request: Missing or invalid request body parameters. GET /segments/{id} Description: Retrieves a specific segment by its ID. Authorizations: - api_key - oauth2 Path Parameters: - id (string, required): The unique identifier of the segment. Responses: - 200 OK: Returns the details of the specified segment. Content Type: application/json Response Body Schema: { "id": "string", "name": "string", "total_active_subscribers": 0, "created_at": "2019-08-24T14:15:22Z", "color": "string" } - 404 Not Found: The specified segment was not found. ``` -------------------------------- ### UserInfo Endpoint Source: https://developers.flodesk.com/index Retrieve basic information about the authenticated user. Requires an active access token in the Authorization header. ```http GET https://api.flodesk.com/oauth2/userinfo Header: "Authorization: Bearer " ``` -------------------------------- ### Workflows API Source: https://developers.flodesk.com/index API endpoints for managing workflows, including listing workflows and managing subscribers within them. Supports filtering by status and pagination. ```APIDOC GET /workflows Server: https://api.flodesk.com/v1 Description: Lists all workflows with optional filtering by status and pagination. Query Parameters: - statuses (array of strings, optional): Filter by workflow statuses (e.g., "active", "paused", "draft"). Defaults to all statuses. - page (integer, optional): The page number for pagination. Defaults to 1. - perPage (integer, optional): The number of records per page. Defaults to 10. Responses: - 200 (application/json): Schema: { "data": [ { "id": "string", "name": "string" } ], "meta": { "page": 0, "total_pages": 0, "per_page": 0, "total_items": 0 } } - 404: Workflows not found. ``` ```APIDOC POST /workflows/{workflow_id}/subscribers Server: https://api.flodesk.com/v1 Description: Adds a subscriber to a specific workflow. Only available for Workflow V2. Requires either subscriber ID or email. Path Parameters: - workflow_id (string, required): The ID of the workflow. Request Body (application/*): { "email": "string" (required if id is not present), "id": "string" (required if email is not present) } Responses: - 204: Subscriber added successfully. - 400: Bad request (e.g., missing email/id). - 404: Workflow or subscriber not found. ``` ```APIDOC DELETE /workflows/{workflow_id}/subscribers/{id_or_email} Server: https://api.flodesk.com/v1 Description: Removes a subscriber from a specific workflow. Only available for Workflow V2. Accepts subscriber ID or email. Path Parameters: - workflow_id (string, required): The ID of the workflow. - id_or_email (string, required): The ID or email of the subscriber to remove. Responses: - 204: Subscriber removed successfully. - 400: Bad request. - 404: Workflow or subscriber not found. ``` -------------------------------- ### Custom Fields API Source: https://developers.flodesk.com/index API endpoints for managing custom fields, including listing custom fields with pagination and creating new custom fields. ```APIDOC GET /custom-fields Server: https://api.flodesk.com/v1 Description: Lists all custom fields with pagination support. Query Parameters: - page (integer, optional): The page number. Defaults to 1. - per_page (integer, optional): The number of records to be returned per page. Defaults to 20, maximum 100. Responses: - 200 (application/json): Schema: { "meta": { "page": 0, "total_pages": 0, "per_page": 0, "total_items": 0 }, "data": [ { "key": "string", "label": "string" } ] } - 400: Bad request. ``` ```APIDOC POST /custom-fields Server: https://api.flodesk.com/v1 Description: Creates a new custom field. Request Body (application/*): { "label": "string" (required): A friendly display label for the custom field. } Responses: - 201 (application/json): Schema: { "key": "string", "label": "string" } - 400: Bad request (e.g., missing label). ``` ```APIDOC GET /custom-fields/all Server: https://api.flodesk.com/v1 Description: Lists all custom fields without pagination. Responses: - 200 (application/json): Schema: [ { "key": "string", "label": "string" } ] - 400: Bad request. ``` -------------------------------- ### Create or Update Subscriber - Flodesk API Source: https://developers.flodesk.com/index API endpoint to create a new subscriber or update an existing one in Flodesk. It accepts subscriber details in the request body and returns the subscriber's status and details. ```APIDOC POST /subscribers Base URL: https://api.flodesk.com/v1/subscribers Authorizations: api_key, oauth2 Request Body Schema: id (string, optional): The subscriber's `id`. Either `email` or `id` must be included. email (string, required): The subscriber's `email`. Either `email` or `id` must be included. first_name (string, optional): The subscriber's first name. last_name (string, optional): The subscriber's last name. custom_fields (object, optional): An object containing custom field data. E.g. `{"favorite_color": "Lavender"}`. segment_ids (array of strings, optional): The segments this subscriber will be added to. Cap at `50`. double_optin (boolean, optional): Whether or not to require the subscriber to confirm subscription via email. This option is only available to set with new subscriber creation. Default to `false` if not indicated. optin_ip (string, optional): IP address from which the subscriber confirmed their opt-in. optin_timestamp (string, optional): The date and time the subscribers confirmed their opt-in in ISO 8601 format. E.g. `2023-01-02T15:04:05.999Z`. Responses: 200 (SubscriberRes): id (string): A read-only generated unique id used to identify each subscriber record. status (string): Enum: "active" "unsubscribed" "unconfirmed" "bounced" "complained" "cleaned" The subscriber's status. email (string): The subscriber's email address. source (string): Enum: "manual" "csv" "form_optin" "integration" "checkout" The source from which the subscriber was added to your list. first_name (string): The subscriber's first name. last_name (string): The subscriber's last name. segments (array of objects): Segments that the subscriber was added to. Cap at `50`. custom_fields (object): An object containing custom field data. optin_ip (string): IP address from which the subscriber confirmed their opt-in. optin_timestamp (string ): The date and time the subscribers confirmed their opt-in in ISO 8601 format. created_at (string ): The date and time the subscriber was added to your list in ISO 8601 format. 400: (Error response details not provided in source text) ``` -------------------------------- ### Flodesk Subscriber Webhook Request Payload and Schema Source: https://developers.flodesk.com/index This entry describes the common request payload structure and schema for Flodesk subscriber-related webhooks, including 'subscriber.created' and 'subscriber.unsubscribed' events. These webhooks are triggered when a subscriber is created or unsubscribed, providing detailed information about the event and the subscriber. ```JSON { "event_name": "string", "event_time": "2019-08-24T14:15:22Z", "subscriber": { "id": "string", "status": "active", "email": "string", "source": "manual", "first_name": "string", "last_name": "string", "segments": [ { "id": "string", "name": "string" } ], "custom_fields": { "property1": "string", "property2": "string" }, "optin_ip": "string", "optin_timestamp": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" }, "segment": { "id": "string", "name": "string" }, "webhook_id": "string" } ``` ```APIDOC Webhook Events: subscriber.created, subscriber.unsubscribed Request Body Schema: application/json Properties: - event_name: string Description: The webhook notification's event name. E.g. `subscriber.created`. - event_time: string Description: The timestamp indicates when the event occurred. - subscriber: object (SubscriberRes) Description: Details of the subscriber related to the event. - webhook_id: string Description: The webhook's identifier. Responses: - 2XX: Indicates that the data was received successfully. ``` -------------------------------- ### Authenticated API Request Header Source: https://developers.flodesk.com/index Include the obtained access token in the 'Authorization' header of subsequent API requests to authenticate your application. ```text Authorization: Bearer ``` -------------------------------- ### Exchange Authorization Code for Tokens Source: https://developers.flodesk.com/index Use a POST request to exchange the verification code received after user authorization for an access token and refresh token. This requires client credentials for authentication. ```curl curl -X POST "https://api.flodesk.com/oauth2/token" \ -H "User-Agent: Your App Name (www.yourapp.com)" \ -H "Authorization: Basic $(echo : | base64)" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "code=&redirect_uri=&grant_type=authorization_code" ``` -------------------------------- ### Token Response Structure Source: https://developers.flodesk.com/index The API response upon successful token exchange includes the access token, token type, expiration time, granted scopes, and a refresh token. ```json { "access_token": "eyJraWQiOiJuUWdsaD...", "token_type": "Bearer", "expires_in": 86400, "scopes": "all", "refresh_token": "fd_rt_aef123..." } ``` -------------------------------- ### Add Subscriber to Segments - Flodesk API Source: https://developers.flodesk.com/index Allows adding a subscriber to one or more segments. Requires the subscriber's ID or email and an array of segment IDs. Returns the updated subscriber details. ```APIDOC POST /subscribers/{id_or_email}/segments Authorizations: - api_key - oauth2 Path Parameters: - id_or_email (required, string): The subscriber's ID or email address. Request Body Schema: - segment_ids (required, Array of strings): An array of identifiers for the segments to add the subscriber to. Responses: - 200 (SubscriberRes): The subscriber object with updated segment information. Properties: - id (string): Unique identifier for the subscriber. - status (string, Enum: "active", "unsubscribed", "unconfirmed", "bounced", "complained", "cleaned"): The subscriber's status. - email (string): The subscriber's email address. - source (string, Enum: "manual", "csv", "form_optin", "integration", "checkout"): The source of the subscriber. - first_name (string): The subscriber's first name. - last_name (string): The subscriber's last name. - segments (Array of objects): Segments the subscriber is added to (max 50). - id (string): Segment ID. - name (string): Segment name. - custom_fields (object): Custom field data. - optin_ip (string): IP address of opt-in. - optin_timestamp (string ): Timestamp of opt-in. - created_at (string ): Timestamp when the subscriber was added. - 404: Subscriber not found. Example Request Body: { "segment_ids": [ "segment_abc123", "segment_xyz789" ] } ``` -------------------------------- ### Rate Limiting Response Headers Source: https://developers.flodesk.com/index API responses include headers indicating the current rate limit status, such as the total limit and remaining requests. ```http HTTP/1.1 200 OK Status: 200 OK X-Fd-RateLimit-Limit: 100 X-Fd-RateLimit-Remaining: 68 ``` -------------------------------- ### Flodesk Webhook Events Source: https://developers.flodesk.com/index Details for specific webhook events, such as 'subscriber.added_to_segment'. This section outlines the structure of the data payload received when a particular event occurs. ```APIDOC subscriber.added_to_segment Event Description: This event is triggered when a subscriber is added to a segment in your Flodesk account. Request Body schema (application/json): event_name (string): The webhook notification's event name. E.g. `subscriber.created`. event_time (string ): The timestamp indicates when the event occurred. subscriber (object - SubscriberRes): (Details of subscriber object not fully specified in input) segment (object - SegmentMini): (Details of segment object not fully specified in input) webhook_id (string): The webhook's identifier. Responses: 2XX: Return any 2XX status to indicate that the data was received successfully. ``` -------------------------------- ### Flodesk Segment Colors API Source: https://developers.flodesk.com/index Retrieves a list of available segment colors that can be used when creating or updating segments. ```APIDOC GET /segments/colors Description: Lists all available segment colors. Authorizations: - api_key - oauth2 Responses: - 200 OK: Returns an array of available color strings. Content Type: application/json Response Body Schema: [ "string" ] - 401 Unauthorized: Authentication failed. ``` -------------------------------- ### Refresh Access Token Source: https://developers.flodesk.com/index Use the refresh token to obtain a new access token when the current one expires. This process also issues a new refresh token, invalidating the previous one. ```curl curl -X POST "https://api.flodesk.com/oauth2/token" \ -H "User-Agent: Your App Name (www.yourapp.com)" \ -H "Authorization: Basic $(echo : | base64)" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "refresh_token=&grant_type=refresh_token" ``` -------------------------------- ### Unsubscribe Subscriber - Flodesk API Source: https://developers.flodesk.com/index Allows unsubscribing a subscriber from all lists. Requires the subscriber's ID or email. Returns a success status. ```APIDOC POST /subscribers/{id_or_email}/unsubscribe Authorizations: - api_key - oauth2 Path Parameters: - id_or_email (required, string): The subscriber's ID or email address. Responses: - 200 (SubscriberRes): Indicates successful unsubscription. The subscriber object may be returned with status updated. Properties: - id (string): Unique identifier for the subscriber. - status (string, Enum: "active", "unsubscribed", "unconfirmed", "bounced", "complained", "cleaned"): The subscriber's status, expected to be "unsubscribed". - email (string): The subscriber's email address. - created_at (string ): Timestamp when the subscriber was added. - 404: Subscriber not found. ``` -------------------------------- ### Flodesk Subscriber Unsubscribe API Source: https://developers.flodesk.com/index Allows unsubscribing a subscriber from Flodesk by providing their ID or email address. This endpoint handles the process of marking a subscriber as unsubscribed. ```APIDOC POST /subscribers/{id_or_email}/unsubscribe Description: Unsubscribes a subscriber from Flodesk. Endpoint: https://api.flodesk.com/v1/subscribers/{id_or_email}/unsubscribe Parameters: - id_or_email (path parameter): The unique identifier or email address of the subscriber to unsubscribe. Responses: - 200 OK: Successfully unsubscribed the subscriber. Content Type: application/json Response Body Schema: { "id": "string", "status": "active", "email": "string", "source": "manual", "first_name": "string", "last_name": "string", "segments": [ { "id": "string", "name": "string" } ], "custom_fields": { "property1": "string", "property2": "string" }, "optin_ip": "string", "optin_timestamp": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } - 404 Not Found: The specified subscriber was not found. ``` -------------------------------- ### Retrieve Subscriber - Flodesk API Source: https://developers.flodesk.com/index API endpoint to retrieve details of a specific subscriber using their ID or email address. It returns the subscriber's record if found. ```APIDOC GET /subscribers/{id_or_email} Authorizations: api_key, oauth2 Path Parameters: id_or_email (string, required): The subscriber's `id` or `email`. Responses: 200 (SubscriberRes): id (string): A read-only generated unique id used to identify each subscriber record. status (string): Enum: "active" "unsubscribed" "unconfirmed" "bounced" "complained" "cleaned" The subscriber's status. email (string): The subscriber's email address. source (string): Enum: "manual" "csv" "form_optin" "integration" "checkout" The source from which the subscriber was added to your list. first_name (string): The subscriber's first name. last_name (string): The subscriber's last name. segments (array of objects): Segments that the subscriber was added to. Cap at `50`. custom_fields (object): An object containing custom field data. optin_ip (string): IP address from which the subscriber confirmed their opt-in. optin_timestamp (string ): The date and time the subscribers confirmed their opt-in in ISO 8601 format. created_at (string ): The date and time the subscriber was added to your list in ISO 8601 format. 400: (Error response details not provided in source text) ``` -------------------------------- ### Remove Subscriber from Segments Source: https://developers.flodesk.com/index Removes a specific subscriber from one or more segments. This operation requires the subscriber's ID or email and an array of segment IDs to remove. ```APIDOC DELETE /subscribers/{id_or_email}/segments Default server: https://api.flodesk.com/v1/subscribers/{id_or_email}/segments Authorizations: api_key, oauth2 Path Parameters: id_or_email (string, required): The ID or email address of the subscriber. Request Body Schema: Content-Type: */* segment_ids (Array of strings, required): An array of identifiers of the segments to remove the subscriber from. Responses: 200 OK: SubscriberRes (Schema identical to GET /subscribers/{id_or_email} response, showing updated segments) 404 Not Found: The specified subscriber could not be found. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.