Skip to main content
PUT
/
installations
/
{installation_id}
/
profiles
/
{app_profile_id}
Updates an existing app profile
curl --request PUT \
  --url https://api-dev.narrative.io/installations/{installation_id}/profiles/{app_profile_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "My profile description",
  "tags": [
    "staging",
    "test"
  ]
}
'
import requests

url = "https://api-dev.narrative.io/installations/{installation_id}/profiles/{app_profile_id}"

payload = {
"description": "My profile description",
"tags": ["staging", "test"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'My profile description', tags: ['staging', 'test']})
};

fetch('https://api-dev.narrative.io/installations/{installation_id}/profiles/{app_profile_id}', 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/installations/{installation_id}/profiles/{app_profile_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'My profile description',
'tags' => [
'staging',
'test'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api-dev.narrative.io/installations/{installation_id}/profiles/{app_profile_id}"

payload := strings.NewReader("{\n \"description\": \"My profile description\",\n \"tags\": [\n \"staging\",\n \"test\"\n ]\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api-dev.narrative.io/installations/{installation_id}/profiles/{app_profile_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"My profile description\",\n \"tags\": [\n \"staging\",\n \"test\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-dev.narrative.io/installations/{installation_id}/profiles/{app_profile_id}")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"My profile description\",\n \"tags\": [\n \"staging\",\n \"test\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "7bc22af4-fb6e-431e-92bc-e366e4f960ff",
  "name": "My profile name",
  "description": "My profile description",
  "status": "disabled",
  "app_id": "123e4567-e89b-12d3-a456-426614174000",
  "app_name": "My App",
  "tags": [
    "production",
    "analytics"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

app_profile_id
string<uuid>
required

The profile ID

installation_id
string<uuid>
required

The installation ID

Body

application/json

Profile creation payload

name
string
description
string
tags
string[]

Optional list of tags to update on the profile

Response

200 - application/json

The updated app profile

id
string<uuid>
name
string
description
string
status
enum<string>
Available options:
enabled,
disabled,
archived
app_id
string

The unique identifier of the app

app_name
string

The name of the app

tags
string[]

List of tags associated with the profile