Definitions Endpoint

This endpoint allows you to export definitions of flows, campaigns and triggers in your account. Note that the schema of flow definitions may change over time.

Exporting Definitions

A GET exports a set of flows and campaigns, and can automatically include dependencies for the requested items, such as groups, triggers and other flows.

  • flow - the UUIDs of flows to include (string, repeatable)
  • campaign - the UUIDs of campaigns to include (string, repeatable)
  • dependencies - whether to include dependencies (all, flows, none, default: all)

Example:

GET /api/v2/definitions.json?flow=f14e4ff0-724d-43fe-a953-1d16aefd1c0b&flow=09d23a05-47fe-11e4-bfe9-b8f6b119e9ab

Response is a collection of definitions:

{
    "version": "13",
    "site": "https://app.rapidpro.io",
    "flows": [
        {
            "uuid": "7adbf194-a05c-4fe0-bd22-a178e24bee5e",
            "name": "My Flow",
            "spec_version": "13.1.0",
            "language": "eng",
            "type": "messaging",
            "nodes": [
                {
                    "uuid": "d2240abf-8c70-4cb4-96e9-c7e67ccb0e2a",
                    "actions": [
                        {
                            "attachments": [],
                            "text": "Hi @contact! Which state do you live in?",
                            "type": "send_msg",
                            "quick_replies": [],
                            "uuid": "9012e709-76c8-4f2f-aea9-c1f7a31e7bb0"
                        }
                    ],
                    "exits": [
                        {
                            "uuid": "81683d94-9623-4706-8878-e314beb9325c"
                        }
                    ]
                }
            ]
        }
    ],
    ...
}