Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 10050Value in
- "draft"
- "active"
- "paused"
- "archived"
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/friend_quest_definitions"{ "data": [ { "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" } } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_quest_definitions" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "key": "weekly-duo", "name": "Weekly duo", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 500, "metric": { "source": "direct" }, "reward": [ { "currency": "gems", "amount": 50 }, { "type": "item", "item": "xp_boost_15m", "quantity": 1 } ], "pairing": "manual" } }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/friend_quest_definitions/string"{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/friend_quest_definitions/string" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Weekly duo" }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_quest_definitions/string/activate" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_quest_definitions/string/pause" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_quest_definitions/string/resume" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_quest_definitions/string/archive" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }}Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 10050Value in
- "draft"
- "active"
- "paused"
- "archived"
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/friend_streak_definitions"{ "data": [ { "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] } } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_streak_definitions" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "key": "daily-duo", "name": "Daily duo", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [ { "length": 3, "reward": [ { "currency": "gems", "amount": 10 } ] }, { "length": 7, "reward": [ { "currency": "gems", "amount": 30 }, { "type": "item", "item": "streak_badge", "quantity": 1 } ] } ] } }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/friend_streak_definitions/string"{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Required revision, checked in the owning transaction.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/friend_streak_definitions/string" \ -H "Idempotency-Key: string" \ -H "If-Match: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Daily duo" }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_streak_definitions/string/activate" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_streak_definitions/string/pause" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_streak_definitions/string/resume" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_streak_definitions/string/archive" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 2 }'{ "id": "string", "key": "string", "name": "string", "status": "draft", "revision": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_streak/v1", "timezone": "environment", "milestones": [] }}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthQuery Parameters
1 <= value <= 10050Value in
- "active"
- "completed"
- "expired"
- "cancelled"
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/friend_quest_definitions/string/quests"{ "data": [ { "id": "string", "definition_id": "string", "period_key": "string", "customer_low": "string", "customer_high": "string", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }, "target": -9007199254740991, "progress_low": -9007199254740991, "progress_high": -9007199254740991, "status": "active", "completed_at": "2019-08-24T14:15:22Z", "reward": [ { "currency": "string", "amount": -9007199254740991 } ], "reward_status": "none", "reward_granted_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_quest_definitions/string/contributions" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_0192f0c0a0b07c3d8e9f0a1b2c3d4e5a", "amount": 25 }'{ "quest": { "id": "string", "definition_id": "string", "period_key": "string", "customer_low": "string", "customer_high": "string", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "config": { "schema": "friend_quest/v1", "period": { "kind": "week", "start_weekday": 1, "start_minute": 0, "timezone": "environment" }, "target": 1, "metric": { "source": "direct" }, "reward": [ { "currency": "string", "amount": 1 } ], "pairing": "manual" }, "target": -9007199254740991, "progress_low": -9007199254740991, "progress_high": -9007199254740991, "status": "active", "completed_at": "2019-08-24T14:15:22Z", "reward": [ { "currency": "string", "amount": -9007199254740991 } ], "reward_status": "none", "reward_granted_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" }, "replayed": true, "applied": true, "completed": true}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/friend_streak_definitions/string/activities" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "cust_0192f0c0a0b07c3d8e9f0a1b2c3d4e5a" }'{ "day_key": "string", "recorded": true, "streaks": [ { "definition_id": "string", "customer_low": "string", "customer_high": "string", "length": -9007199254740991, "effective_length": -9007199254740991, "longest": -9007199254740991, "last_day_key": "string", "status": "active", "started_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "milestones": [ { "definition_id": "string", "customer_low": "string", "customer_high": "string", "length": -9007199254740991 } ]}