> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dados.rio/llms.txt
> Use this file to discover all available pages before exploring further.

# Adicionar vínculo CPF-Secretaria

> Vincula um CPF a uma secretaria (cd_ua SICI) na base de apoio. Um CPF pode ter múltiplos vínculos.



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/app-rmi/refs/heads/main/docs/openapi-v3.json post /admin/cpf-secretaria/{cpf}
openapi: 3.0.0
info:
  description: >-
    API para gerenciamento de dados de cidadãos do Rio de Janeiro, incluindo
    autodeclaração de informações e verificação de contato.
  title: API RMI
  termsOfService: http://swagger.io/terms/
  contact:
    name: Suporte RMI
    url: http://www.rio.rj.gov.br
    email: suporte@rio.rj.gov.br
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://services.pref.rio/rmi/v1
    description: Production
  - url: https://services.staging.app.dados.rio/rmi/v1
    description: Staging
security: []
tags:
  - description: >-
      Operações relacionadas a cidadãos, incluindo consulta e atualização de
      dados autodeclarados
    name: citizen
  - description: >-
      Carteira de veículos (bicicleta elétrica, autopropelido, ciclomotor),
      condutores e catálogo
    name: mobilidade
  - description: Operações relacionadas a departamentos/unidades administrativas (UA)
    name: departments
  - description: Gerenciamento de categorias de notificação (admin) e listagem pública
    name: notification-categories
  - description: Gerenciamento de preferências de notificação por CPF e telefone
    name: notification-preferences
  - description: Operações de verificação de saúde da API
    name: health
  - description: >-
      Integração Salesforce Person Account: login sync, webhook inbound (delta),
      proxies CRM e push assíncrono RMI→SF via sync worker
    name: salesforce
paths:
  /admin/cpf-secretaria/{cpf}:
    post:
      tags:
        - admin
        - cpf-secretaria
      summary: Adicionar vínculo CPF-Secretaria
      description: >-
        Vincula um CPF a uma secretaria (cd_ua SICI) na base de apoio. Um CPF
        pode ter múltiplos vínculos.
      parameters:
        - description: CPF do usuário (11 dígitos)
          name: cpf
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.AddCPFSecretariaRequest'
        description: cd_ua da secretaria
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.CPFSecretariaResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    models.AddCPFSecretariaRequest:
      type: object
      required:
        - cd_ua
      properties:
        cd_ua:
          type: string
    models.CPFSecretariaResponse:
      type: object
      properties:
        cd_ua:
          type: string
        cpf:
          type: string
        created_at:
          type: string
        created_by:
          type: string
        id:
          type: string
        updated_at:
          type: string
    handlers.ErrorResponse:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.