Meta · Arazzo Workflow

Meta Refresh Audience Cohort

Version 1.0.0

Resolve the caller, add a new cohort to an audience, then remove stale members.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AdvertisingAnalyticsArtificial IntelligenceMessagingSocialSocial-MediaVirtual RealityArazzoWorkflows

Provider

meta

Workflows

refresh-audience-cohort
Resolve the caller, add a new cohort, then remove stale audience members.
Reads /me for context, adds the supplied hashed cohort payload to the custom audience, then removes stale members from the same audience.
3 steps inputs: accessToken, addPayload, customAudienceId outputs: addSucceeded, callerId, removed
1
resolveCaller
Resolve the authenticated caller's id for an audit trail.
2
addCohort
Add the new cohort's hashed payload to the custom audience.
3
removeStale
Remove stale members from the same custom audience. The remove edge is declared without a request body in the spec.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Meta Refresh Audience Cohort
  summary: Resolve the caller, add a new cohort to an audience, then remove stale members.
  description: >-
    Refreshes a custom audience cohort in one pass. It resolves the caller via
    /me for an audit trail, adds the new cohort's hashed payload to the custom
    audience, and then removes stale members from the same audience. The remove
    edge is declared without a request body in the spec, so stale members are
    dissociated by audience id. Every step inlines its request so the flow can
    be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-400.60
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-400.60
      capability_name: Digital Marketing Management
      spec: meta-custom-audiences-api-openapi.yml
      confidence: 0.75
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: customAudiencesApi
  url: ../openapi/meta-custom-audiences-api-openapi.yml
  type: openapi
- name: usersApi
  url: ../openapi/meta-users-api-openapi.yml
  type: openapi
workflows:
- workflowId: refresh-audience-cohort
  summary: Resolve the caller, add a new cohort, then remove stale audience members.
  description: >-
    Reads /me for context, adds the supplied hashed cohort payload to the custom
    audience, then removes stale members from the same audience.
  inputs:
    type: object
    required:
    - accessToken
    - customAudienceId
    - addPayload
    properties:
      accessToken:
        type: string
        description: A Meta Graph API user access token with ads permissions.
      customAudienceId:
        type: string
        description: The custom audience to refresh.
      addPayload:
        type: object
        description: Hashed payload for the new cohort to add (e.g. EMAIL_SHA256 data).
  steps:
  - stepId: resolveCaller
    description: >-
      Resolve the authenticated caller's id for an audit trail.
    operationId: getMe
    parameters:
    - name: access_token
      in: query
      value: $inputs.accessToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      callerId: $response.body#/id
  - stepId: addCohort
    description: >-
      Add the new cohort's hashed payload to the custom audience.
    operationId: addUsersToCustomAudience
    parameters:
    - name: custom-audience-id
      in: path
      value: $inputs.customAudienceId
    - name: access_token
      in: query
      value: $inputs.accessToken
    requestBody:
      contentType: application/json
      payload:
        payload: $inputs.addPayload
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      addSucceeded: $response.body#/success
  - stepId: removeStale
    description: >-
      Remove stale members from the same custom audience. The remove edge is
      declared without a request body in the spec.
    operationId: removeUsersFromCustomAudience
    parameters:
    - name: custom-audience-id
      in: path
      value: $inputs.customAudienceId
    - name: access_token
      in: query
      value: $inputs.accessToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      removed: $response.body#/success
  outputs:
    callerId: $steps.resolveCaller.outputs.callerId
    addSucceeded: $steps.addCohort.outputs.addSucceeded
    removed: $steps.removeStale.outputs.removed

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/meta-refresh-audience-cohort-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.