Skip to content

Manual get message

This endpoint returns message by ID.

Alert

This request must be sent from the server side only.

Secret key

You must add the x-api-key: your-secret from the admin panel settings to the headers

Endpoint

GET https://api.kod.mobi/manual/message/:id

Response

The Response will be an array of ManualMessage

ManualMessage

Param Type Description
id number Message id
channel Channel Channel type
status MessageStatus Message status
error string | null Message error

Example

curl --location 'https://api.kod.mobi/manual/message/1' \
  --header 'x-api-key: <replace me>'
const headers = new Headers();
headers.append('x-api-key', '<replace me>');

const requestOptions: RequestInit = {
  method: 'GET',
  headers,
  redirect: 'follow',
};

fetch(
  'https://api.kod.mobi/manual/message/1',
  requestOptions,
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
1
2
3
4
5
6
7
8
9
<?php

$client = new \GuzzleHttp\Client();
$headers = [
  'x-api-key' => '<replace me>'
];
$request = new Request('GET', 'https://api.kod.mobi/manual/message/1', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
package main

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

func main() { 
    client := &http.Client{}
    req, err := http.NewRequest("GET", "https://api.kod.mobi/manual/message/1", nil)

    if err != nil {
        panic(err)
    }
    req.Header.Add("x-api-key", "<replace me>")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := io.ReadAll(res.Body)
    if err != nil {
        panic(err)
    }
    fmt.Println(string(body))
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-api-key", "<replace me>".into());

    let request = client.request(reqwest::Method::GET, "https://api.kod.mobi/manual/message/1")
        .headers(headers);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

Example output

{
  "id": 1,
  "channel": "email",
  "status": "success",
  "error": null
}