> For the complete documentation index, see [llms.txt](https://docs.justpush.io/introduction/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.justpush.io/introduction/user-manual/getting-started.md).

# Getting Started

## Getting Started

The [JustPush](https://www.justpush.io) user manual is our manual and tutorial list explaining how to implement and use JustPush services. It describes the process of getting from downloading the app to working / implementing with various frameworks.

***

{% stepper %}
{% step %}

#### Download and install one of our apps

Our apps are offered across various platforms. Follow the individual instructions to download / install the various applications.

<details>

<summary>iOS</summary>

1. Click the following link to install
2.

</details>

<details>

<summary>Android</summary>

1. Click the following link to install

</details>

<details>

<summary>Web (to be announced)</summary>

</details>
{% endstep %}

{% step %}

#### Find your API Key

Find your API as described in the dedicated [API Key](https://github.com/hniehorster/justpush-backend/blob/main/introduction/user-manual/api-key.md) topic.
{% endstep %}

{% step %}

#### Send your first message

Find per programming language how you can send your first message. These examples do not use an SDK and are just setup to send your first message.

{% tabs %}
{% tab title="cURL" %}

```
curl -X "POST" "https://api.justpush.io/messages" \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "message": "My First Message",
  "topic" : "Default",
  "title": "Bingo! I've just received my first message",
  "user": "REPLACE WITH API TOKEN"
}'

```

{% endtab %}

{% tab title="PHP" %}

```php
$response = file_get_contents("https://api.justpush.io/messages", false, stream_context_create([
    'http' => [
        'method' => 'POST',
        'header' => [
            'Accept: application/json',
            'Content-Type: application/json; charset=utf-8',
        ],
        'content' => json_encode([
            "message" => "My First Message",
            "topic" => "Default",
            "title" => "Bingo! I've just received my first message",
            "user" => "REPLACE WITH API TOKEN"
        ]),
    ]
]));

echo $response;
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
fetch('https://api.justpush.io/messages', {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json; charset=utf-8',
  },
  body: JSON.stringify({
    message: 'My First Message',
    topic: 'Default',
    title: "Bingo! I've just received my first message",
    user: 'REPLACE WITH API TOKEN'
  })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
async function sendMessage() {
  const response = await fetch('https://api.justpush.io/messages', {
    method: 'POST',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json; charset=utf-8',
    },
    body: JSON.stringify({
      message: 'My First Message',
      topic: 'Default',
      title: "Bingo! I've just received my first message",
      user: 'REPLACE WITH API TOKEN'
    }),
  });

  if (!response.ok) {
    throw new Error(`Error: ${response.statusText}`);
  }

  const data = await response.json();
  console.log(data);
}

sendMessage().catch(error => console.error('Error:', error));

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	message := map[string]string{
		"message": "My First Message",
		"topic":   "Default",
		"title":   "Bingo! I've just received my first message",
		"user":    "REPLACE WITH API TOKEN",
	}

	jsonData, err := json.Marshal(message)
	if err != nil {
		fmt.Println("Error marshaling JSON:", err)
		return
	}

	resp, err := http.Post("https://api.justpush.io/messages", "application/json; charset=utf-8", bytes.NewBuffer(jsonData))
	if err != nil {
		fmt.Println("Error making POST request:", err)
		return
	}
	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		fmt.Println("Request failed with status:", resp.Status)
		return
	}

	var result map[string]interface{}
	json.NewDecoder(resp.Body).Decode(&result)
	fmt.Println("Response:", result)
}
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.justpush.io/messages"

data = {
    "message": "My First Message",
    "topic": "Default",
    "title": "Bingo! I've just received my first message",
    "user": "REPLACE WITH API TOKEN"
}

response = requests.post(url, json=data, headers={
    'Accept': 'application/json',
    'Content-Type': 'application/json; charset=utf-8'
})

if response.status_code == 200:
    print("Response:", response.json())
else:
    print(f"Error: {response.status_code} - {response.text}")

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'json'
require 'uri'

url = URI.parse("https://api.justpush.io/messages")

data = {
  message: "My First Message",
  topic: "Default",
  title: "Bingo! I've just received my first message",
  user: "REPLACE WITH API TOKEN"
}

json_data = data.to_json

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url.path, {
  'Accept' => 'application/json',
  'Content-Type' => 'application/json; charset=utf-8'
})
request.body = json_data

response = http.request(request)

if response.is_a?(Net::HTTPSuccess)
  puts "Response: #{JSON.parse(response.body)}"
else
  puts "Error: #{response.code} - #{response.message}"
end

```

{% endtab %}

{% tab title="Laravel" %}
The example below is applicable to a Laravel command. After adding the command, use your terminal and run `php artisan justpush:first`

```php
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Http;

class SendNotification extends Command
{
    protected $signature = 'justpush:first';

    protected $description = 'Send a notification via the JustPush API';

    public function handle()
    {
        $url = "https://api.justpush.io/messages";

        $data = [
            "message" => "My First Message",
            "topic" => "Default",
            "title" => "Bingo! I've just received my first message",
            "user" => "REPLACE WITH API TOKEN",
        ];

        $response = Http::withHeaders([
            'Accept' => 'application/json',
            'Content-Type' => 'application/json; charset=utf-8',
        ])->post($url, $data);

        if ($response->successful()) {
            $this->info('Notification sent successfully: ' . json_encode($response->json()));
        } else {
            $this->error('Failed to send notification: ' . $response->status() . ' - ' . $response->body());
        }

        return 0;
    }
}

```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Check out our SDKs to make your integration easier.
{% endhint %}
{% endstep %}
{% endstepper %}

***

## Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.justpush.io/introduction/user-manual/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
