Skip to main content
POST
/
app-invites
/
{app_invite_id}
/
activate
Activate an app invite
curl --request POST \
  --url https://api-dev.narrative.io/app-invites/{app_invite_id}/activate \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api-dev.narrative.io/app-invites/{app_invite_id}/activate"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api-dev.narrative.io/app-invites/{app_invite_id}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.narrative.io/app-invites/{app_invite_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api-dev.narrative.io/app-invites/{app_invite_id}/activate"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api-dev.narrative.io/app-invites/{app_invite_id}/activate")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-dev.narrative.io/app-invites/{app_invite_id}/activate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "activated_at": null,
  "app": {
    "id": 100,
    "name": "Test App",
    "slug": "test-app"
  },
  "code": "abc123def456ghi789jkl012",
  "company": {
    "id": 42,
    "logo": "https://example.com/logo.png",
    "name": "Acme Corp"
  },
  "created_at": "2025-01-01T00:00:00Z",
  "data": {
    "key": "value"
  },
  "display_name": "Partner onboarding invite",
  "invitee_name": "Jane Smith",
  "status": "pending",
  "tags": [
    "onboarding",
    "partner"
  ],
  "updated_at": "2025-01-01T00:00:00Z",
  "url": "https://example.com/invite?code=abc123def456ghi789jkl012"
}
{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}
{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

app_invite_id
string<uuid>
required

Unique identifier for an app invite.

Response

Successfully activated the app invite.

An app invite with full details.

id
string<uuid>
required

Unique identifier for the app invite.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

app
object
required

Summary information about an app.

Example:
{
"id": 100,
"name": "Test App",
"slug": "test-app"
}
code
string
required

The 24-character invite code.

Example:

"abc123def456ghi789jkl012"

company
object
required

Summary information about a company.

Example:
{
"id": 42,
"logo": "https://example.com/logo.png",
"name": "Acme Corp"
}
created_at
string<date-time>
required

The timestamp when the invite was created.

Example:

"2025-01-01T00:00:00Z"

status
enum<string>
required

The lifecycle status of an app invite.

Available options:
pending,
active,
archived
Example:

"pending"

updated_at
string<date-time>
required

The timestamp when the invite was last updated.

Example:

"2025-01-15T10:30:00Z"

url
string
required

The full invite URL constructed from the base URL and invite code.

Example:

"https://example.com/invite?code=abc123def456ghi789jkl012"

activated_at
string<date-time> | null

The timestamp when the invite was activated, or null if not yet activated.

Example:

"2025-01-15T10:30:00Z"

data
object | null

Custom JSON data associated with the invite.

Example:
{ "key": "value" }
display_name
string | null

An optional display name for the invite.

Example:

"Partner onboarding invite"

invitee_name
string | null

An optional name for the invitee. Maximum 1024 characters.

Example:

"Jane Smith"

tags
string[]

A list of tags associated with the invite. Each tag is max 128 characters.

Example:
["onboarding", "partner"]