{
    "info": {
        "_postman_id": "lnkn-api-v1",
        "name": "lnkn API v1",
        "description": "Collection oficial da API REST do lnkn (encurtador de links).",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{api_key}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://lnkn.top/api/v1",
            "type": "string"
        },
        {
            "key": "api_key",
            "value": "lnkn_sua_chave_aqui",
            "type": "string"
        },
        {
            "key": "code",
            "value": "",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "Links",
            "item": [
                {
                    "name": "Listar links",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/links",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "links"
                            ]
                        },
                        "description": "Lista os links do usu\u00e1rio (paginado)."
                    },
                    "response": []
                },
                {
                    "name": "Criar link",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/links",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "links"
                            ]
                        },
                        "description": "Cria um link encurtado.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"destination_url\": \"https://exemplo.com/pagina\",\n    \"title\": \"Campanha\",\n    \"code\": \"campanha\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Detalhes do link",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/links/{{code}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "links",
                                "{{code}}"
                            ]
                        },
                        "description": "Retorna detalhes de um link pelo c\u00f3digo."
                    },
                    "response": []
                },
                {
                    "name": "Remover link",
                    "request": {
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/links/{{code}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "links",
                                "{{code}}"
                            ]
                        },
                        "description": "Remove um link pelo c\u00f3digo."
                    },
                    "response": []
                }
            ]
        }
    ]
}